Comp Command

Comp Command is a Windows command for performing a bytewise comparison of the contents of different files.

What is Comp Command?

A Microsoft Windows command for performing a bytewise comparison of the contents of different files. The comp command is typically used for byte-by-byte comparison of text files, or for a comparison of the contents of two directories.

Comp Command examples

To compare C:\file1.txt and C:\file2.txt and show the differences between them as characters, type the following:

comp C:\file1.txt C:\file2.txt /a

You can also use wildcards to specify multiple files. For the full syntax of this command, type comp/? at the command prompt.