Dos Prompt Home Page Command Prompt Reference
COMP

Compares the contents of two files or sets of files.

COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C] [/OFF[LINE]]

data1             Specifies location and name(s) of first file(s) to compare.
data2             Specifies location and name(s) of second files to compare.
/D                  Displays differences in decimal format.
/A                  Displays differences in ASCII characters.
/L                   Displays line numbers for differences.
/N=number    Compares only the first specified number of lines in each file.
/C                  Disregards case of ASCII letters when comparing files.
/OFF[LINE]  Do not skip files with offline attribute set.

To compare sets of files, use wildcards in data1 and data2 parameters.

Notes

Unless the N: option is used, only the size of the file is compared.

Examples

comp file1.txt file2.txt

comp document2.txt document1.txt /N=10

Associated Commands

 

 

Top of the Page - Command Prompt Reference Home Page
Last Page Update: 08/03/2012

© Sembee Ltd. 1998 - 2016.

Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.

All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

Server 1