File Compare (comp) | \ windows \system32\comp.exe |
File Compare ( comp.exe ) compares two files (or more, using wildcards), and reports whether the files are identical; if they are, you'll see Files compare OK . If the files are the same size but have different contents, comp.exe displays the differences, character by character, by reporting Compare Error at OFFSET n (where n is byte offsetthe location of the difference, in characters , from the beginning of the file). If the files are different sizes, comp.exe reports Files are different sizes , and the comparison stops there. Here are the options for comp.exe :
comp [ file1 ] [ file2 ] [/n= number ] [/c] [/off] [/d] [/l]
Option | Description |
---|---|
file1 , file2 | Specify the filenames of the files to compare. |
/n= number | Compare only a few lines; example: /n=5 |
/c | Treat upper- and lowercase letters as identical. |
/off | Include offline files; see the Synchronization Manager. |
/d | Displays differences in decimal format. |
/l | Include line numbers in the output. |
TIP
Comp.exe will ask if you want to perform another comparison, unless you use the input redirection character (see Chapter 6), like this: comp file1 file2 <n |