The A+ Certification & PC Repair Handbook (Charles River Media Networking/Security)

Compares the data in two files or sets of files byte by byte. The two files or sets can be on the same or different drives or folders.

Use

Type “COMP” and press <Enter>. You’ll be prompted for the first file to compare. Enter the full path and press <Enter>. You’ll then be prompted for the second file to compare. Enter the full path and press <Enter>. You’ll then be prompted for any switches. If you want to use no switches, press <Enter>. If you do want to use a switch, enter the first desired switch with any applicable parameters, if any, and press <Enter>. Every time you enter a switch, you’ll be prompted to enter another after you press <Enter>. After you press <Enter> after having entered no switches, COMP will proceed to make the comparison.

Alternatively, you can type “COMP” followed by the first file path, the second file path, and any switches and other parameters desired. For example, using the 32-bit command prompt in 2000 or XP, compare two files designating the output to be noted in characters:

COMP C:\Documents and Settings\Rojo\My Documents\Chapter05.doc D:\Book Chapters\Chapter05KJI.doc /a

Switches

/a: Displays differences as characters.

/c: Performs a comparison that is not case sensitive.

/d: Displays differences in decimal format. (The default format is hexadecimal.)

/l: Displays the number of the line on which a difference occurs, instead of displaying the byte offset.

/n=number: Compares the first number of lines of both files, even if the files are different sizes.

Notes

Категории