Contents of the FILECOMP.TXT file
By Mike Graham
Filecomp is a quick 'n dirty file comparison program,
very much like COMP, which comes with DOS. The real
benefits to using FileComp, rather than COMP, are the
- FileComp outputs the offset of the discrepancy in
decimal and hexadecimal format. COMP outputs only in
- FileComp outputs the discrepant values in both
decimal and hexadecimal, COMP outputs only in
- FileComp ouputs one discrepancy per line, COMP
requires four lines per discrepancy.
- FileComp will continue to output discrepancies until
there are no more to be found. COMP stops after 10,
with no option to continue.
- FileComp can compare files of differing size using
the "-i" ignore flag. COMP absolutely refuses to
compare unlike-sized files.
- FileComp is batch-file friendly, with no user
prompts. It accomplishes what it needs to do, with
all selectable items set with command-line
parameters. COMP does not. It is batch-mode
Up to three parameters can be entered at the command
line. Two file names, and an optional flag "-i" to tell
FileComp that it should ignore file size discrepancies.
The parameters can be in any order. The first file
name in the parameter list is File1 in the output, and
the second is File2.
FILECOMP \JUNK.DAT -i \JUNK.NEW
In this example, FileComp will ignore file size
discrepancies (if any) and will reference JUNK.DAT
as File1 and JUNK.NEW as File2.