help.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
FC
Notes  Examples
────────────────────────────────────────────────────────────────────────────
 
                                     FC
 
Compares two files and displays the differences between them.
 
Syntax
 
To make an ASCII comparison, use the following syntax:
 
    FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn][drive1:][path1]filename1
    [drive2:][path2]filename2
 
To make a binary comparison, use the following syntax:
 
    FC /B [drive1:][path1]filename1 [drive2:][path2]filename2
 
Parameters
 
[drive1:][path1]filename1
    Specifies the location and name of the first file you want to compare.
 
[drive2:][path2]filename2
    Specifies the location and name of the second file you want to compare.
 
Switches
 
/A
    Abbreviates the output of an ASCII comparison. Instead of displaying all
    the lines that are different, FC displays only the first and last line
    for each set of differences.
 
/C
    Ignores the case of letters.
 
/L
    Compares the files in ASCII mode. FC compares the two files line by line
    and attempts to resynchronize the files after finding a mismatch. This
    is the default mode for comparing files that do not have extensions of
    .EXE, .COM, .SYS, .OBJ, .LIB, or .BIN.
 
/LBn
    Sets the number of lines for the internal line buffer. The default
    length of the line buffer is 100 lines. If the files being compared have
    more than this number of consecutive differing lines, FC cancels the
    comparison.
 
/N
    Displays the line numbers during an ASCII comparison.
 
/T
    Does not expand tabs to spaces. The default behavior is to treat tabs as
    spaces, with stops at each eighth character position.
 
/W
    Compresses white space (tabs and spaces) during the comparison. If a
    line contains many consecutive spaces or tabs, the /W switch treats
    these characters as a single space. When used with the /W switch, FC
    ignores (and does not compare) white space at the beginning and end of a
    line.
 
/nnnn
    Specifies the number of consecutive lines that must match before FC
    considers the files to be resynchronized. If the number of matching
    lines in the files is less than this number, FC displays the matching
    lines as differences. The default value is 2.
 
/B
    Compares the files in binary mode. FC compares the two files byte by
    byte and does not attempt to resynchronize the files after finding a
    mismatch. This is the default mode for comparing files that have
    extensions of .EXE, .COM, .SYS, .OBJ, .LIB, or .BIN.
 
                                      ♦