Share via


RoboCopy sync with hash compare

Question

Saturday, April 1, 2017 10:25 PM

I am currently using RoboCopy to synchronize folders, and mostly it works well. But sometimes a source file has to be restored to an older version, and I want robocopy to sync that one. But it seems that robocopy only decides what to sync based on date/time, so the incorrect but newer file at destination is not overwritten. My hope is that I am missing a setting somewhere to get RoboCopy to do a hash compare and sync these correctly. I have tried doing my own sync code in PowerShell but it is just too slow. I am comparing many hundreds of MB of files at every logon, and doing a hash compare with PowerShell under those circumstances is really slow. Then again, maybe a hash compare in Robocopy would be slow too, and my current workaround of opening a restored file and saving, to give it a newer date/time stamp is really the best option? Especially given that I need to support Windows 7 clients too, and if there is a hash compare it wouldn't surprise me if it was a Windows 10 thing.

All replies (1)

Saturday, April 1, 2017 11:06 PM

Well a search of your questions leads too

How does Robocopy determine if a file is “changed”

So does not appear to support hash to me, but have your tried the /mir or /it switches?