Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
The COMPACT command is a built-in utility in Windows that allows users to compress and decompress files and directories on NTFS file systems. This can help save disk space without the need to archive files into ZIP or RAR formats. The command is executed via the Command Prompt (CMD) and is especially useful for managing storage on systems with limited disk space.
Examples:
View Compression Status: To check the compression status of files and directories in a specific folder, use the following command:
compact /c C:\YourFolder
This will display each file and directory's compression status within "C:\YourFolder".
Compress a Directory: To compress all files in a directory, use:
compact /c /s:C:\YourFolder
The /c
switch specifies compression, and /s
applies the command to all subdirectories within "C:\YourFolder".
Compress a Specific File: If you want to compress a specific file, use the command:
compact /c C:\YourFolder\YourFile.txt
Decompress a Directory: To decompress files in a directory, use:
compact /u /s:C:\YourFolder
The /u
switch specifies decompression.
Decompress a Specific File: To decompress a specific file, use:
compact /u C:\YourFolder\YourFile.txt
Force Compression or Decompression:
If you encounter files that are already compressed or decompressed and want to ensure the command is applied, use the /f
switch:
compact /c /f C:\YourFolder
Display Help Information: To see all available options and usage information for the COMPACT command, enter:
compact /?
Notes: