COMP (2000 AND XP ONLY)


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

  • Use wildcard characters to compare groups of files.

  • COMP displays the results in memory addresses, so it’s useful only to indicate that the files are different, not to display the differences.

  • Files must be the same size, or the only result will be that the files aren’t the same size. The exception to this is if the /n=number switch is used. In place of the word number, enter the number of lines of data to be compared. If you enter, for example, 10, the first 10 lines of each file will be compared.

  • This command is extraordinarily particular; even a change in case somewhere in the path might cause COMP to report that it cannot open the file. If you use it in an MS-DOS prompt, you might have to convert folder names or filenames to the 8.3 standard. Look up 8.3 filename standard on the Internet if you need help.




The A+ Certification & PC Repair Handbook
The A+ Certification & PC Repair Handbook (Charles River Media Networking/Security)
ISBN: 1584503726
EAN: 2147483647
Year: 2003
Pages: 390

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net