Comp Command In Windows Server 2008
This article describes how to use Comp command in Windows Server 2008 operating system.
Introduction
Comp command is available in Windows Server 2008, Windows 7, Windows Vista, Windows XP. Comp command is used to compare the contents of two files or group of files to find the information that does not match. Files to be compared can have the same name or different names.
Syntax
comp [<data1>] [<data2>] [/d] [/a] [/l] [/n=<number>] [/c]
|
In above syntax
Parameters |
Description |
<data1> |
Defines the location and name of the first file or group of files to be compared. |
<data2> |
Defines the location and name of another file or group of files to be compared. |
/d |
Displays the differences between compared files in decimal format. The default format is hexadecimal. |
/a |
Displays differences as ASCII characters. |
/l |
Displays the number of lines where the difference occurred, rather displaying the byte offset. |
/n=<number> |
Allows you to enter the number of lines to be compared of each file. |
/c |
Performs a comparison that is not case sensitive. |
/off [line] |
Do not leave the file with offline attribute. |
Note- Wildcard characters (? and *) can be used to specify set of files to be compared.
Example
Compare the Report1.txt file on drive D: with Report2.txt file on same drive, enter the following text:
comp D:\Report1.txt Report2.txt
|
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here