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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
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\abo>which comp
C:\WINDOWS\system32\comp.exe 04/14/2008 05:00 AM 15872 bytes


- Rich


.



Relevant Pages

  • File-Compare "fc" falsely reports mismatch between identical files
    ... I'm trying to compare pairs of binary files and test the result ... seems to fail by reporting a mismatch between certain pairs of ... Notice that a mismatch is reported! ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: i am getting the message "Type Mismatch"
    ... The message means that JET is trying to compare 2 things that don't match, e.g. comparing text to a number or a date. ... The solution will be to identify where the mismatch is occurring. ... start removing criteria until the problem goes away. ... Copy the SQL statement, and post it here. ...
    (microsoft.public.access.queries)
  • Re: Paging WUN...
    ... proportions) only he has a short spiky flatop and american accent. ... I'll compare and contrast, reporting back appropriately. ...
    (uk.rec.motorcycles)
  • Re: Compare files - with different date fields
    ... I'd like to create a compare job that will compare two files. ... different data file compare products: ... to stop *reporting* differences after N have been displayed. ...
    (bit.listserv.ibm-main)
  • Re: [WR] Sun 0940Z West Moors/E.Dorset .. fine morning (now!)
    ... Hurn - what are they reporting? ... I'll compare ... with the Davis station I run at work at the ATC training college ... Martin Rowley ...
    (uk.sci.weather)