File Systems |
Compact is the command-line version of the compression functionality in My Computer. Compact displays and alters the compression of folders and files on NTFS volumes. It also displays the compression state of folders. For more information about this program, at the command prompt type:
compact /?
Table 3.15 describes the options available with Compact. The syntax of the command is:
compact [/c] [/u] [/s[:folder]] [/a] [/i] [/f] [/q] [filename [...]]
Table 3.15 Compact Options
Option | Description |
---|---|
none | Displays the compression state of the current folder. |
/c | Compresses the specified folder or file. |
/u | Decompresses the specified folder or file. |
/s[:folder] | Specifies that the requested action (compress or decompress) be applied to all subfolders of the specified folder, or to the current folder if none is specified. |
/i | Ignores errors. |
/f | Forces a specified folder or file to compress or decompress. |
/a | Displays files with the hidden or system attribute. |
/q | Reports only the most essential information. |
filename | Specifies a pattern, file, or folder. You can use multiple file names and wildcard characters. |
The following are reasons to use this utility rather than My Computer:
Note
Compact automatically compresses or decompresses all of the files and subfolders when you change the compression state of a folder. It does not ask whether you want to change the compression state of the files or subfolders in it.
When you attempt to compress a volume that is very low on free space, you might receive an error indicating that there was insufficient space to perform the action.
These errors indicate that the system needs additional free space to perform a compression. The system is not designed to manipulate the data in place on the disk. Additional space is needed to buffer the user data and to hold additional file system metadata. The amount of additional free space required depends on the cluster size, file size, and available space.