File-Compare "fc" falsely reports mismatch between identical files


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:
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
***** FILE.BIN
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


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File-Compare "fc" falsely reports mismatch between identical files 24
Compare size between two files 1
FC 3
comparing files 7
compare file 9
Piping input to fc 2
Comparing text files 4
Text File Compare 11