Paul
Thu Jul 21 21:57:33 CDT 2005
Comparing files byte by byte can be slow.
If two files have the same size and CRC32 checksum, they are very likely
identical.
I personally like a freeware crc32 COM object called COMCRC, available at
http://www.geocities.com/SiliconValley/Vista/1388/. It is a long page and
there are a number of CRC-related items. This COM object is fairly fast and
handles DVD-sized files easily. A sneaky person can modify a file in a way
that the size and CRC32 checksum is unchanged.
It is almost impossible to modify a file such that its MD5 checksum is
unchanged. I have not yet found a MD5 checksum COM object. I have found
one handy MD5 program which can be put in a folder and which produces a list
of MD5 checksums on all the files in the folder and its subfolder. It can
also validate all the files against that list. Prior to creating a CD with
data such as digital pictures, I create a folder of everything I intend to
put on the CD, put this program in the folder, and run it to create the
list. After creating the CD, I run the program on the CD and it reads the
CD and verifies all the files on the CD. Look for dvdsig at
http://members.ozemail.com.au/~nulifetv/freezip/freeware/
If I want to compare two folders, I run dvdsig on each of them, DOS sort the
resulting .MD5 files, and then run DOS file compare to spot any differences.
-Paul Randall
"Tony LaPaso" <tlapaso@comcast.net> wrote in message
news:#EVpQ7LjFHA.2156@TK2MSFTNGP14.phx.gbl...
> Hello all,
>
> Is there a way I can use WSH to compare two files for equality? Do I
> have to call the DOS 'fc' or 'comp' commands?
>
> I was thinking about writing my own comparison function by then I'd
> have to be able to read a binary file. Is this possible as well?
>
> Thank you.
>
> --
> Tony LaPaso
>
>