FC compares two files or sets of files, in text or binary mode,
and displays the differences between them.
FC [switches] [drive1:][path1]filename1 [drive2][path2]filename2
/A Display only first and last lines for each set of differences.
/B Perform a binary comparison.
/C Disregard the case of letters.
/L Compare files as ASCII text.
/LBn Set the maximum number of consecutive different ASCII lines to n.
/Mn Set the maximum differences in binary comparison to n bytes
(default = 20, 0 = unlimited, /M = /M0).
/N Display the line numbers on a text comparison.
/Q Don't show the list of differences.
/R Show a brief final report (always active when using /S).
/S Extend the scan to the files in subdirectories.
/T Do not expand tabs to spaces.
/U Show the filenames of the files without a correspondent.
/W Pack white space (tabs and spaces) for text comparison.
/X Do not show context lines in text comparison.
/nnn Set the minimum number of consecutive matching lines to nnn.
for comparison resynchronization.
/? Shows the help.
FC is LFN aware and use them automatically if the operating system
supports the long file names.
FC defaults to binary mode for files .EXE, .COM, .SYS, .OBJ, .BIN, .DLL
In binary mode FC shows the offset in the file of the differing bytes,
their value in hexadecimal and, if they are ASCII printable chars, their
By default the binary compare stops after 20 differences but that value
can be modified through the /M switch. /M0 means "unlimited differences".
/M is interpreted as /M0.
A design limitation of this program is that, in the text mode file
comparison, only the first 32765 lines are compared; the remaining lines
are ignored. The line length is virtually unlimited.
FC supports NLS (national language support).
FC has the following EXITCODES (ERRORLEVEL):
0 All the files match
1 At least a pair of files differs
2 Invalid parameter on the command line
3 File not found
4 Error opening file(s)
FC /L /M0 C:\ foo.txt D:\foo.txt
Please read this command's lsm file also.
You will find the updated version (internet) here and
the version described in this manual page here.
The lsm file contains information about the name of the programmer,
the download site, and some other command related information.
Copyright © 1999 Maurizio Spagni, updated 2008 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.