The description below is from the book
Easy Way by Everett Murdock Ph.D.
for information about downloading the book.
COMP [d:][path][filename] [d:][path][filename]
Purpose: Compares two groups of files to find information that
match. (In DOS Version 6, this program is stored on the DOS supplemental
Compares two files or two groups of files. The files can have the same
or different names. Wildcard characters (? and *) can be used to specify
of files to be compared (files of the same names will be compared).
Each set of specified files will be compared, one set at a time.
Before starting the comparison, the program checks to see if files
valid end-of-file mark. COMP will not compare files that do not contain
end-of-file marker. If a specified file does not contain such a mark,
following error message will be displayed:
EOF mark not found
This mark is created by your word processor or other application program
indicate the end of the file. You can create the end- of-file marker by
pressing and holding the Ctrl key and then pressing the letter Z key.
The COMP program also checks to make sure the file sizes indicated in the
directory are the same for compared files; a comparison is not carried
the files are stored as different sizes.
If you enter one or more pathnames or filenames after the command name,
press the Enter key the comparison will begin immediately; therefore, you
make sure the diskette(s) containing the files to be compared are already
specified drives. If you want to change diskettes after entering the
enter the command name with no following parameters. If you enter the
command with no options , the program will prompt you for the file and/or
First, the program will display:
Enter primary filename
Enter the name of the first file or group of files. Next, the program
Enter 2nd filename or drive ID
After you enter the second filename(s), the program will compare the
issuing reports on its progress.
If the files are identical, it will report:
Files compare OK
If the files are not identical, it will report on the differences it
COMP will display the memory locations of any portions of the compared
that do not match. After ten mismatches, the program terminates the
The following message is displayed
10 Mismatches - ending compare
After all pairs specified have been compared, COMP will display
Compare more files (Y/N)?
To enter more files to compare, press the letter Y key. To terminate the
comparisons, press the letter N key.
/A - Displays the differences found between compared files as
/C - Performs a comparison that is not case-sensitive.
/D - Displays the differences found between compared files in decimal
(The default format is hexadecimal.)
/L - Displays the number of the line where the difference occurred,
than the byte offset.
/N:(number) - Allows you to enter the number of lines in both files
be compared, even if the files are of different sizes.
For more information about this command, refer to the downloadable book
DOS the Easy Way.
To compare all the files ending in .TXT on drive A with all of the files
in .TXT on drive B, enter
comp a:*.txt b:
To compare all of the files in the LETTERS directory on drive A with all
files in the LETTERS directory on drive B, enter
comp a:\letters b:\letters
Back to the