Compact
Displays and changes file or directory compression on an NTFS partition. If used without parameters, the compact displays the compression state of the current directory.
Parameters
/C
Compresses the specified directory or file.
/u
Extract the specified directory or file.
S:dir
Specifies that the requested operation (either compressed or uncompressed) is applied to all subdirectories of the specified directory, or if no directory is specified, to all subdirectories of the current directory.
/A
Displays hidden or system files.
/I
Ignore the error.
/F
Compresses or uncompress the specified directory or file. This is used when the file is partially compressed when the system crashes and interrupts the operation. To force file compression to complete, use the/C and/F parameters and specify partially compressed files.
/q
Only the most basic information is reported.
FileName
Specifies the file or directory. You can use multiple file names and wildcard characters (* and?).
/?
Display Help at the command prompt.
Comments
The compact command is a command-line version of the comparison feature in the NTFS file system. It displays and alters the compression properties of files and directories on NTFS partitions. The compression status of the directory indicates whether the files added to the directory are automatically compressed. When you set the compression state of a directory, you do not have to change the compression state of files that are already in that directory.
For volumes that have been compressed through DriveSpace or DoubleSpace, you will not be able to use the compact for read, write operations, or assembly volumes.
Example
To set the compression status for the current folder and its subfolders, and for existing files, under the current folder, type:
COMPACT/C/S
Does not change the compression status of the current folder, but only the files in the current folder, subfolders, and files in all subfolders, setting their compression status. To do this, under the current folder, type:
COMPACT/C/S *.*
To compress a volume, under the root folder of the volume, type:
COMPACT/C/i/s:\
This example sets the compression state of the root folder and all folders on the volume, and compresses each file on the volume. Use the/I parameter to ensure that the error message does not interrupt the compression process.
To compress all files in all subdirectories of the directory \tmp and \tmp that end with. bmp without modifying the compressed properties of these directories, type:
COMPACT/C/s:\tmp *.bmp
To force a full compression of a file zebra.bmp that has been partially compressed when the system crashes, type:
COMPACT/C/F Zebra.bmp
To remove a compressed property from the directory C:\Tmp without changing the compression status of any file in the directory, type:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.