Comparing files and directories after a file copy

I am currently using batch files to back up and restore data to our systems during rollouts and migrations. Source and destination OS is Windows XP Pro.

I need to find a way to check the source and destination to make sure they match afterwards to be sure all files are copied. I've seen issues where the hard drive is failing and it didn't copy all of the data and i didn't realize it because the batch file started copying the next set of data (like "favorites").

I've tried windiff, fc, and so on but nothing that is automated enough just to show a results screen if they are different sizes. Example: the local mydocs folder has 5000 files totaling 3.5GB and the server has only 4000 files totaling 2.3GB... i want to see the files and folders in a summary that were NOT copied.

Any ideas on this? BTW: i've gone through the XP and VB sections and have not been able to find a solution that matches what I need.

Thanks!
ViperZ2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sirbountyCommented:
I would highly recommend your using robocopy for this...
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

It will copy source to target and then update it at any point thereafter with any file(s) that have been changed or were not copied in the process.

Better still, it includes a retry parameter to allow you to specify the number of attempts to make before giving up (if any)...
0
DocGyverCommented:
Robo copy is most likely the thing you are looking for to solve your over all problem but for the compare with reports part of your question I _highly_ recomment Beyond COmpare from:

http://scootersoftware.com/

I've been using BC for years now and hands down it is the best comparitor I've used.   I use it primarily for GUI comparisons but it has a command line interface for generating reports and you can specify how you want the files compare: full binary, size, date, crc, etc with any combination there of.

Doc..
0
Rob WilliamsCommented:
If looking for a utility to compare after the fact, you can use 2XExplorer. It will allow you to mirror two windows displaying the same folders in each file structure. As you browse through one set of folders, the other widow will display the same, matching folder structure, at the same time, in the other window. Differences, or missing files are highlighted, and it's free.
http://www.tucows.com/preview/195884
0
Ron MalmsteadInformation Services ManagerCommented:
Did you use the /D switch....so that it will only copy modified or new files ?
Example
xcopy "\\server1\share\*.*" "\\server2\share\*.*" /D /E /I /H /Y /Z
This will copy all files, including hidden and system, all directories including empty ones, overwriting if the file that exists is older than the one your copying, without prompting, and copies all files in restartable mode in case of network error.

If you run this xcopy command with the /D switch...it is automatically comparing the two directories, as well as subdirectories, and files, by "DATE".  When the command is finished...if you run it again...in a short amount of time it should say 0 files copied, because no changes have occurred.  Pretty much syncronizing two directories.

good luck.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ViperZ2000Author Commented:
Just to be clear, this is being done is mass migrations where we may have 250 computers per day over a 10 day period.

xuserx2000 - i like this option but will need to test it out to see how much time it adds.

keep the suggestions coming!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.