How to compare two directories using File Checksum Integrity Verif

D

Don Anderson

I copied a user's home directory to a new location. Before I delete the files
from the old location, the user wants me to assure them that no corruption
occurred during the copy. One of my coworkers suggested using the File
Checksum Integrity Verifier. I have downloaded it but am having trouble
understanding the operation. I don't want to store the hash in an xml
database unless there is no way around it. I just want to create a hash of
\\serverA\userhome and compare it to \\serverB\userhome in real time to see
if the hashes are identical. userhome contains at least several dozen
subdirectories and maybe 4,000 files. I want to do the whole thing in one
compare if possible. If a different Discussion Group would be more
appropriate for this question, please advise.

Thanks,
Don
 
G

G. Morgan

Don said:
I copied a user's home directory to a new location. Before I delete the files
from the old location, the user wants me to assure them that no corruption
occurred during the copy. One of my coworkers suggested using the File
Checksum Integrity Verifier. I have downloaded it but am having trouble
understanding the operation. I don't want to store the hash in an xml
database unless there is no way around it. I just want to create a hash of
\\serverA\userhome and compare it to \\serverB\userhome in real time to see
if the hashes are identical. userhome contains at least several dozen
subdirectories and maybe 4,000 files. I want to do the whole thing in one
compare if possible. If a different Discussion Group would be more
appropriate for this question, please advise.

Use the /V and /Z switches with the copy command.

or better yet

use Robocopy:
http://en.wikipedia.org/wiki/Robocopy
 
D

Don Anderson

Ok, next time I will use robocopy but for this directory it is too late. Is
it possible to use FCIV the way I am proposing?
 
D

Don Anderson

Yeah, I did that same Google search. Nothing helpful there. That's why I cam
here. Maybe someone else knows. Is there another MS Discussion Group that
would be specific to that tool?
 
Z

_Z

Don said:
Yeah, I did that same Google search. Nothing helpful there. That's
why I cam here. Maybe someone else knows. Is there another MS
Discussion Group that would be specific to that tool?

Don,
Why not use 'FCIV ... -bp {-base-} > location-n.txt' at both locations,
then 'FC location-1.txt location-2.txt'
 
D

Don Anderson

_Z:

Ok, I got the first part to work, creating the text files with the hashes,
but I'm not sure I understand how to use fc (File Compare).

The hash text files are c:\junk\junktest1.txt and c:\junk\junktest2.txt

When I run C:\Junk>fc c:\junk\junktest1.txt c:\junk\junktest2.txt

I get the output below, which is just showing the entire contents of the two
files. I'm not sure what it is supposed to show if they are equal. Sorry to
sound so dense.

Thanks,
Don

Comparing files C:\JUNK\junktest1.txt and C:\JUNK\JUNKTEST2.TXT
***** C:\JUNK\junktest1.txt
//
ae7ec3a42edb9a8f3de050a5c14b0a47 c:\junktest1\DEFAULT.SET
b7eaa82a9e1d0f32203dcd133e4145a7 c:\junktest1\Dir2Text.exe
53fd0a9301dcf279c1ab676d1719b62c c:\junktest1\DIR2TXT.ICO
d05bd7e1a9a030b2e99cbbc40fff4bfe c:\junktest1\DIRS.DIR
eb5639d75ea3724e513006dca0e0a269 c:\junktest1\DotDir.txt
265f696e32dc694d06a3282b32099701 c:\junktest1\FILE_ID.DIZ
ea2a36cd50d7445969d6dd60db72efa0 c:\junktest1\README.TXT
***** C:\JUNK\JUNKTEST2.TXT
//
ae7ec3a42edb9a8f3de050a5c14b0a47 c:\junktest2\DEFAULT.SET
b7eaa82a9e1d0f32203dcd133e4145a7 c:\junktest2\Dir2Text.exe
53fd0a9301dcf279c1ab676d1719b62c c:\junktest2\DIR2TXT.ICO
d05bd7e1a9a030b2e99cbbc40fff4bfe c:\junktest2\DIRS.DIR
eb5639d75ea3724e513006dca0e0a269 c:\junktest2\DotDir.txt
265f696e32dc694d06a3282b32099701 c:\junktest2\FILE_ID.DIZ
ea2a36cd50d7445969d6dd60db72efa0 c:\junktest2\README.TXT
*****
 
B

Big_Al

G. Morgan said this on 1/14/2009 9:54 PM:
I am not familiar with that software, sorry.

Google comes up with a bunch of MD5 checkers though. Some of them look like
they do simple directory comparisons.

http://www.google.com/search?hl=en&...-US:official&hs=NEd&q=md5+checker&btnG=Search

If you run robocopy and "/MIR" option to mirror a folder (and all subs)
from A to B, Robocopy will just update any files it finds different.
Which if all is fine, it will do nothing but run down the list and
verify that they are okay. Else it will make the needed changes to the
files.
 
Z

_Z

Don said:
_Z:

Ok, I got the first part to work, creating the text files with the
hashes, but I'm not sure I understand how to use fc (File Compare).

The hash text files are c:\junk\junktest1.txt and
c:\junk\junktest2.txt

When I run C:\Junk>fc c:\junk\junktest1.txt c:\junk\junktest2.txt

I get the output below, which is just showing the entire contents of
the two files. I'm not sure what it is supposed to show if they are
equal. Sorry to sound so dense.

Thanks,
Don

Comparing files C:\JUNK\junktest1.txt and C:\JUNK\JUNKTEST2.TXT
***** C:\JUNK\junktest1.txt
//
ae7ec3a42edb9a8f3de050a5c14b0a47 c:\junktest1\DEFAULT.SET
...
ea2a36cd50d7445969d6dd60db72efa0 c:\junktest1\README.TXT
***** C:\JUNK\JUNKTEST2.TXT
//
ae7ec3a42edb9a8f3de050a5c14b0a47 c:\junktest2\DEFAULT.SET
...
ea2a36cd50d7445969d6dd60db72efa0 c:\junktest2\README.TXT
*****

Don,
It is showing a FAIL on EVERY line because you did not use
the -bp {-base-} switch. Notice that
c:\junktest1\DEFAULT.SET is different from
c:\junktest2\DEFAULT.SET

(-r : recursive (all sub-folders)
-bp : specify base path to remove from full path name)

Use:
FCIV.exe c:\junktest1 -r -bp c:\junktest1 > c:\junk\junktest1.txt
and

FCIV.exe c:\junktest2 -r -bp c:\junktest2 > c:\junk\junktest2.txt
which will give:
ae7ec3a42edb9a8f3de050a5c14b0a47 DEFAULT.SET
....
ea2a36cd50d7445969d6dd60db72efa0 README.TXT
in both c:\junk\junktest1.txt and c:\junk\junktest2.txt

Result of
FC c:\junk\junktest1.txt c:\junk\junktest2.txt
should be:

Comparing files c:\junk\junktest1.txt and
c:\junk\junktest2.txt
FC: no differences encountered
 

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

Top