FC v. 2.0  (c) 1999 Maurizio Spagni

FC compares two files or sets of files, in text or binary mode, and
displays the differences between them.

FC implements Paul Heckel's algorithm from the Communications of the
Association for Computing Machinery, April 1978 for detecting the differences
between two files. This algorithm has the advantage over more commonly used
compare algorithms that it is fast and can detect differences of an arbitrary
number of lines. It reads both files twice if there are differences. The
comparison engine comes from a source code donated to the Public Domain by
the author Nick Ramsay (nick@sycom1.demon.co.uk) the 5 August 1996 and has
been widely modified by me.

The syntax is as follows:

FC [switches] [drive1:][path1]filename1 [drive2][path2]filename2 [switches]

 /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
 /Mn   Set the maximum differences in binary comparison to n bytes
 /N    Display the line numbers on a text comparison
 /T    Do not expand tabs to spaces
 /V    Version info
 /W    Pack white space (tabs and spaces) for text comparison
 /X    Do not show context lines in text comparison

FC defaults to binary mode for files .EXE, .COM, .SYS, .OBJ, .BIN and .LIB.

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 ASCII char.

By default the binary compare stops after 20 differences but that value can
be modified through the /M switch. /M0 means "unlimited differences".

A design limitation of this program is that, in the text mode file
comparison, only the first 16300 lines are compared; the remaining lines are
ignored. The line length is virtually unlimited.

FC supports wildcards in the file specifications. Some words on this:
- specifying a directory is the same as specifying all the files in that
  directory (i.e. "*.*").
  Example: "FC C:\ A:" is the same as "FC C:\*.* A:*.*"
- if no filename2 is entered then "." (the current directory) is assumed.
  Example: "FC C:\FOO.TXT" is the same as "FC C:\FOO.TXT .\*.*"
- if filename1 has wildcards but filename2 hasn't, then all the files matching
  filename1 are compared with the same file filename2.
  Example: "FC *.NEW ANCESTOR.OLD"
	   All the files *.NEW are compared with ANCESTOR.OLD
- if filename1 has wildcards and filename2 is "*.*" then all the files
  matching filename1 are compared with a file with the same name but in the
  path specified by filename2 (if that file exists, of course).
  Example: "FC *.* A:*.*" or, in short, "FC . A:"
	   All the files in the current directory are compared with their copy
	   on A:
- if filename1 has wildcards and filename2 too then all the files in the path
  of filename1 and matching filename1 *AND* filename2 are compared with a file
  with the same name but in the path specified by filename2 (if that file exists,
  of course).
  Example: "FC *.TXT *.BAK"
	   All the files in the current directory are compared with their
	   backup copy.
It's more easily done than said. If what you really want is to compare each file
in a directory with all the files in another you can always use the form:
FC *.* MYDIR\????????.???

The exit codes for ERRORLEVEL are as follows:
	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

Please send bug reports to: flurmy@comune.re.it.
