Compact is a command for the NTFS file system compression feature. It displays and modifies the file or directory compression on the NTFS partition. This command allows you to view and modify the files and directories on the NTFS partition, but does not include the volume compression attribute.
If you want to obtain more drive space on your computer, you can use this command to compress the file. When compact is used, you must note that when you compact a folder or decompress it, the folder and file are automatically compressed or decompressed, the system no longer asks whether the application and subfolders or files will be changed.
TIPS: This command is not applicable in Windows 98/me dos windows and can be used in Windows 2000/XP/Vista.
Displays or changes the File compression on the NTFS partition.
Compact [/C/u] [/s [: Dir] [/A] [/I] [/F] [/q] [filename [...]
/C compresses the specified file. The directory will be marked, so that the added files will be compressed later.
/U decompress the specified file. The directory is marked so that the files added later will not be compressed.
/S executes the specified operation on the specified directory and all the files in the subdirectory. The default "dir" is the current directory.
/A displays files with hidden or system attributes. By default, these files are ignored.
/I continues the specified operation even after an error occurs. By default, compact stops when an error occurs.
/F forcibly compress all specified files, including compressed files. By default, compressed files are ignored.
/Q only reports the most important information.
Filename specifies the type, file, and directory.
When not used with parameters, COMPACT Displays the compression status of the current directory and Its contained files. You can use multiple file names and wildcards. A space must be added between multiple parameters.
Detailed parsing process:
1. If you want to view the file and price compression status under the C directory, just enter: compact in the command prompt
2. if there is a showbiz folder on drive C, how can we set C: showbiz and all the directories and files included to the compressed state so that the files added to the directory will be automatically compressed.
Enter: Compact/C/S: C:/showbiz in the command prompt
Its/C function is to compress the specified directory or file
/S indicates that the operation to be requested is applied to all subdirectories in the specified directory.
3. If you want to compress the volume, enter: Compact/C/S in the root folder of the volume:
This sets the compression status of the root file and all folders on the volume, and compresses each file on the volume. The/I parameter ensures that error messages do not interrupt the compression process.
4.if you want to force the file zebra.bmp to be compressed when the system crashes, perform the following operations:
Compact/C/F zebra.bmp
ArticleCopyright from http://vista.zol.com.cn owned by original author