text stringlengths 0 4.23k |
|---|
If you omit necessary components of either data1 or data2, or if you omit data2 entirely, this command prompts you for the missing information. |
If data1 contains only a drive letter or a directory name with no file name, this command compares all of the files in the specified directory to the file specified in data1. |
If data2 contains only a drive letter or a directory name, the default file name for data2 becomes the same name as for data1. |
If the comp command can't find the specified files, it will prompt you with a message about whether you want to compare additional files. |
The files that you compare can have the same file name, provided they're in different directories or on different drives. You can use wildcard characters (* and ?) to specify file names. |
You must specify /n to compare files of different sizes. If the file sizes are different and /n isn't specified, the following message is displayed: |
Files are different sizes |
Compare more files (Y/N)? |
To compare these files anyway, press N to stop the command. Then, run the comp command again, using the /n option to compare only the first portion of each file. |
If you use wildcard characters (* and ?) to specify multiple files, comp finds the first file that matches data1 and compares it with the corresponding file in data2, if it exists. The comp command reports the results of the comparison for each file matching data1. When finished, comp displays the following message: |
Compare more files (Y/N)? |
Compare more files (Y/N)? |
To compare more files, press Y. The comp command prompts you for the locations and names of the new files. To stop the comparisons, press N. When you press Y, you're prompted for which command-line options to use. If you don't specify any command-line options, comp uses the ones you specified before. |
Examples |
To compare the contents of the directory c:\reports with the backup directory \\sales\backup\april, type: |
\\sales\backup\april |
comp c:\reports \\sales\backup\april |
To compare the first ten lines of the text files in the \invoice directory and display the result in decimal format, type: |
comp \invoice\*.txt \invoice\backup\*.txt /n=10 /d |
compact vdisk |
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 |
Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. This parameter is useful because dynamically expanding VHDs increase in size as you add files, but they do not automatically reduce in size when you delete files. |
Syntax |
compact vdisk |
Remarks |
A dynamically expanding VHD must be selected for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it. |
You can only use compact dynamically expanding VHDs that are detached or attached as read-only. |
compact |
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:XPRESS4K (fastest and default value)XPRESS8KXPRESS16KLZX (most compact) |
/CompactOs |
Sets or queries the system's compression state. Supported options are:query - Queries the system's Compact state.always - Compresses all operating system binaries and sets the system state to Compact, which remains unless administrator changes it.never - Uncompresses all operating system binaries and sets the system state to non-Compact, which remains unless administrator changes it. |
/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. |
[:<dir>] |
<dir> |
<filename> |
Remarks |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.