Quincy Center for Technical Education
Computer Technology Department

Compact

Displays and alters the compression of files or directories on NTFS partitions.

compact [/c|/u] [/s[:dir]] [/a] [/q] [/i] [/f] [filename[...]]

Parameters

none

Used without parameters, compact displays the compression state of the current directory.

/c

Compresses the specified directory or file.

/u

Uncompresses the specified directory or file.

/s:dir

Specifies that the requested action (compress or uncompress) be applied to all subdirectories of the specified directory, or of the current directory if none is specified.

/a

Displays hidden or system files.

/q

Reports only the most essential information.

/i

Ignores errors.

/f

Forces compression or uncompression of the specified directory or file. This is used in the case of a file that was partly compressed when the operation was interrupted by a system crash. To force the file to be compressed in its entirety, use the /c and /f parameters and specify the partially compressed file.

filename

Specifies the file or directory. You can use multiple file names and wildcard characters (* and ?).