Compact Command In Windows Server 2008
In this article, I will explain how the Compact command can be used in Windows server 2008.
Compact command is Windows Server 2008 command line tool. This command is available in Window 7,Windows Server 2008, Windows Vista, Windows XP and Windows 2000. Compact command allows us to compress or uncompress the files on NTFS partitions. Using this command you can display or change the compression of files or directories on NTFS file system.
compact [/c | /u] [/s[:<Dir>]] [/a] [/i] [/f] [/q] [<File Name>[...]]
Parameters of Compact command
||Compresses the given directory or a file.
||Decompresses the given directory or a file.
||Applies compact command to all directories and sub directories or of the current director if none is specified.
||Displays files with hidden and system attributes.
||Continues performing operations even after errors have occur.
||Forces compress or uncompress operations on given files, even those files that was partly compressed when the operation was interrupted by a system crash.
||Reports only the most essential information.
||Specifies the file or directory. You can use wildcard characters(* and ?) to specify multiple files.
Note: If above syntax is used without parameter, compact displays the compression state of the current directory and subdirectories.
1. Check the compression status of file.
2. To set the compression state of files and subdirectories within the current directory, without change the compression state of the current directory.
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here