R
Rich Pasco
I'm using Windows XP Professional SP3.
I'm trying to compare pairs of binary files and test the result
through the errorlevel. I thought "fc" would do the job, but it
seems to fail by reporting a mismatch between certain pairs of
identical files.
Please refer to the transcript below. First I copy a raw file to
a temporary file, and verify that the copy was successful: It was:
Now, I use "fc" to compare the same two files:
Notice that a mismatch is reported! This should not be!
Next, I use fc to compare the copy to itself:
Of course. But why didn't I get the same result above?
Here are the versions of the tools I am using:
- Rich
I'm trying to compare pairs of binary files and test the result
through the errorlevel. I thought "fc" would do the job, but it
seems to fail by reporting a mismatch between certain pairs of
identical files.
Please refer to the transcript below. First I copy a raw file to
a temporary file, and verify that the copy was successful: It was:
C:\test>copy IMG_0001.dcm.raw file.bin
1 file(s) copied.
C:\test>comp IMG_0001.dcm.raw file.bin
Comparing IMG_0001.dcm.raw and file.bin...
Files compare OK
Compare more files (Y/N) ? n
Now, I use "fc" to compare the same two files:
C:\test>fc IMG_0001.dcm.raw file.bin
Comparing files IMG_0001.dcm.raw and FILE.BIN
***** IMG_0001.dcm.raw
0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0
0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0
***** FILE.BIN
0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0
0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°0°
*****
Notice that a mismatch is reported! This should not be!
Next, I use fc to compare the copy to itself:
C:\test>fc file.bin file.bin
Comparing files file.bin and FILE.BIN
FC: no differences encountered
Of course. But why didn't I get the same result above?
Here are the versions of the tools I am using:
C:\test>which fc
C:\WINDOWS\system32\fc.exe 04/14/2008 05:00 AM 14848 bytes
C:\test>which comp
C:\WINDOWS\system32\comp.exe 04/14/2008 05:00 AM 15872 bytes
- Rich