A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/compact below:

compact | Microsoft Learn

Displays or alters the compression of files or directories on NTFS partitions. If used without parameters, compact displays the compression state of the current directory and any files it contains.

Syntax
compact [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [/EXE[:algorithm]] [/CompactOs[:option] [/windir:dir]] [filename [...]]
Parameters Parameter Description /c Compresses the specified directory or file. Directories are marked so any files added afterwards are compressed, unless the /EXE parameter is specified. /u Uncompresses the specified directory or file. Directories are marked so any files added afterwards aren't compressed. If the /EXE parameter is specified, only files compressed as executables are uncompressed; if you don't specify the /EXE parameter, only NTFS compressed files are uncompressed. /s[:<dir>] Performs the chosen operation on files in the specified directory and all subdirectories. By default, the current directory is used as the <dir> value. /a Displays hidden or system files. By default, these files aren't included. /i Continues performing the specified operation, ignoring errors. By default, this command stops when an error is encountered. /f Forces compression or uncompression of the specified directory or file. Already-compressed files are skipped by default. The /f parameter is used in the case of a file that was partly compressed when the operation was interrupted by a system crash. To force the file to be compressed in its entirety, use the /c and /f parameters and specify the partially compressed file. /q Reports only the most essential information. /EXE Uses compression optimized for executable files that are read frequently, but not modified. Supported algorithms are: /CompactOs Sets or queries the system's compression state. Supported options are: /windir Used with the /CompactOs:query parameter, when querying the offline operating system. Specifies the directory where Windows is installed. <filename> Specifies a pattern, file, or directory. You can use multiple file names, and the * and ? wildcard characters. /? Displays help at the command prompt. Examples

To set the compression state of the current directory, its subdirectories, and existing files, type:

compact /c /s

To set the compression state of files and subdirectories within the current directory, without altering the compression state of the current directory itself, type:

compact /c /s *.*

To compress a volume, from the root directory of the volume, type:

compact /c /i /s:\

Note

This example sets the compression state of all directories (including the root directory on the volume) and compresses every file on the volume. The /i parameter prevents error messages from interrupting the compression process.

To compress all files with the .bmp file name extension in the \tmp directory and all subdirectories of \tmp, without modifying the compressed attribute of the directories, type:

compact /c /s:\tmp *.bmp

To force complete compression of the file zebra.bmp, which was partially compressed during a system crash, type:

compact /c /f zebra.bmp

To remove the compressed attribute from the directory c:\tmp, without changing the compression state of any files in that directory, type:

compact /u c:\tmp

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3