Compact command in Windows
The compact command displays or changes the process of compressing files or folders on an NTFS partition. If used without parameters, the compact command displays the compression status of the current directory and the files contained therein.
For an example of how to use this command, please see the Example below.
Compact command syntax
compact [/c | /u] [/s[:
Parameters
Parameter Description / c Compress the specified directory or file. / u Extract the specified file or folder. /S[:Note
- Compact command is the command line version of NTFS file system compression. The compression status of a directory indicates whether files are automatically compressed when they are added to the folder. Setting the compression status of a directory does not necessarily change the compression status of the files already in the directory.
- You cannot use the compact command to read, write or mount compressed drives using DriveSpace or DoubleSpace.
- You cannot use the compact command to compress File Allocation Table (FAT) partitions or FAT32 partitions.
For example
To set the compression status of the current directory, its subfolders and existing files, enter:
compact /c /s
To set the compression status of files and subdirectories in the current directory, without changing the compression status of the current directory, enter:
compact /c /s *.*
To compress a drive, from the root directory (the root directory of that drive), enter:
compact /c /i /s:
Note:
This example sets the compression status of all folders (including the root directory on the drive) and compresses all files on that drive. The / i parameter prevents error messages that interrupt the compression process.
To compress all files with the .bmp extension in the Tmp folder and all Tmp subdirectories , without modifying the compression properties of the directories, enter:
compact /c /s:tmp *.bmp
To force full compression of Zebra.bmp file , partially compressed while the system crashes, enter:
compact /c /f zebra.bmp
To remove the compression attribute from the C: Tmp folder , without changing the compression status of any file in that directory, enter:
compact /uc:tmp
See more:
- Comp command in Windows
- The convert in Windows command
- The cipher command in Windows
You should read it
- Free use of Paragon Drive Copy 11 Compact program
- 3 The model of car refrigerator is super compact
- 5 'top' ultraportable laptops in Vietnam
- AQUOS R2 Compact: The smartphone has both moles and rabbit ears, being rated 'worst in history'
- 20 beautiful, compact and creative desk designs at home
- Command at in Windows
- Summary of DOS commands in MS-DOS
- Summary of the common Run CMD commands
May be interested
- Rem command in Windowsthe rem command helps write comments (comments) in a batch file or config.sys.
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
- The sfc command in Windows(applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
- Reg command copy in Windowsto copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
- Fc command in Windowsthe fc command compares two files or a collection of files and displays the differences between them.
- The echo command in Windowsthe echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
- Xcopy command in Windowsthe xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.