Specifications

Version 2.0
89
comp
Summary
Compares the contents of two files on a byte for byte basis.
Usage
comp [-b] file1 file2
Options
-b - Display one screen at a time
file1 - First file name (directory name or wildcards not
permitted)
file2 - Second file name (directory name or wildcards not
permitted)
Description
This command compares the contents of two files in binary mode. It displays up to 10
differences between the two files. For each difference, up to 32 bytes from the
location where the difference starts is dumped. It will exit immediately if the lengths
of the compared files are different.
Status Codes Returned
SHELL_SUCCESS The function operated as expected.
SHELL_NOT_EQUAL The files were not identical.
SHELL_INVALID_PARAMETER One of the passed in parameters was incorrectly formatted or its
value was out of bounds.
SHELL_SECURITY_VIOLATION This function was not performed due to a security violation
SHELL_NOT_FOUND The requested file was not found.
Examples
To compare two files with different lengths:
fs0:\> comp bios.inf legacy.inf
Compare fs0:\bios.inf to fs0:\legacy.inf
Difference #1: File sizes mismatch
[difference(s) encountered]
To compare two files with the same contents:
fs0:\> comp bios.inf rafter.inf
Compare fs0:\bios.inf to fs0:\rafter.inf
[no difference encountered]
To compare two files with the same length but different contents: