Name
File Compare (fc) — \windows\system32\fc.exe
Synopsis
File Compare (fc.exe) compares the contents of
two files (or more, using wildcards), and displays the differences
(if any). If the files are identical, fc.exe
will report FC:
no
differences
encountered. If the
files are different, fc.exe lists the differing
lines. To compare two files, type fc
bill.txt
marty.txt. The output
will look something like this:
Comparing files Bill.txt and Marty.txt ***** Bill.txt Way down Louisiana close to New Orleans Way back up in the woods among the evergreens There stood a log cabin made of earth and wood ***** Marty.txt Way down Louisiana close to New Orleans Way back up in the woods among the antihistamines There stood a log cabin made of earth and wood *****
For each line or sequence of lines that is found to differ in the two files, fc.exe prints out a pair of excerpts from each file. The first and last line in each excerpt are what the two files have in common, and are included for context. The lines in between (only a single line in this example) show the differences. The syntax for fc.exe is as follows:
fcfile1 file2[/a] [/b] [/c] [/lbn] [/n] [/t] [/w] [/off] [/nnn]
The options file1,
file2, /c, and
/off and are the same as those for File Compare
(comp), discussed previously.
|
Option |
Description |
|---|---|
|
/a |
Display only first and last lines for each set of differences, as opposed to the default of every different line. |
|
/b |
Treat the files as binary and perform the comparison on a byte-by-byte ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access