comp Command Examples

Compare the contents of two files or sets of files. Use wildcards (*) to compare sets of files. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/comp.

comp

comp {{path\to\file1}} {{path\to\file2}}

comp {{path\to\directory1}}\* {{path\to\directory2}}\*

comp /d {{path\to\file1}} {{path\to\file2}}

comp /a {{path\to\file1}} {{path\to\file2}}

comp /l {{path\to\file1}} {{path\to\file2}}

comp /c {{path\to\file1}} {{path\to\file2}}

comp /n={{5}} {{path\to\file1}} {{path\to\file2}}