Command: comp

  COMP compares two files.

Syntax:

  COMP [/options] [drive][path]file1 [drive][path]file2
       where [file1] and [file2] are file names (possibly with wild
       cards) or directory names. If [file2] is omitted, the current
       directory is assumed.
       drive  the drive letter, e.g. C:
       path   the directory, e.g. \example\
       file1  the first file to compare, e.g. test1.txt
       file2  the second file to compare, e.g. test2.txt

Options:

  #       Do not print more than # errors per file. If # = 0, do not
          limit the number of errors. Default is 0 if [file1] refers
          to a single file, 10 if more than one file.
          Enter e.g. /0 or /40 to obtain results.
  /?      Shows the help.

Comments:

  COMP.COM is a replacement for the MS-DOS command of the same name.
  It compares the two files as binary files and prints out the
  differences, one per line, with the character equivalents of any bytes
  that correspond to printable characters.
  If the second parameter is not given, the first file is compared with
  a file of the same name in the current directory of the current drive.
  Either argument may be a directory, or may contain wild cards (but
  not both). Directory arguments refer to all files in the given
  directory, but not subdirectories of the directory.
  The '#' parameter gives the maximum number of errors to report per
  file. Default is 65535 if file1 is a single file, 10 otherwise.
  The '/' in the above synopsis refers to the SWITCH character.

Examples:

  comp c:\program\help.txt c:\program\help1.txt
  comp c:\program\help.txt c:\program\help1.txt | more
  comp c:\program\help.txt c:\program\help1.txt > differs.txt
  comp /30 c:\program\help.txt c:\program\help1.txt

See also:

  diskcomp
  fc
  md5sum
  more
  switchar

  Copyright © 1998 Jim Hall, updated 2007 and 2022
  by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.