Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move folder between drives on NTFS and preserve timestamps [closed]

Sorry, I know this sounds like a newbie question. But seriously, I'm an experienced developer, and I understand that Windows 7 Pro 64-bit and the like will say, "Oh, if you move an NTFS tree from one drive to another, when I write the children files that really means that I'm modifying the parent folder so I'll update its timestamp." So I wind up with all the destination files having the same timestamps as the original, but all of the folders having the same just-now-modified date/time.

So I understand what's happening. And I know that I could write my own utility (I have) to copy/move files on NTFS. But utilities are risky---if they aren't NTFS-aware, they could ignore other properties or miss things like NTFS Alternate Data Streams (ADS), etc.

So does anyone know a good, NTFS-aware tree-move utility that will simply move all of a tree and maintain the timestamps? I don't want to risk losing anything. Thanks.

like image 637
Garret Wilson Avatar asked Apr 20 '12 15:04

Garret Wilson


2 Answers

I was going to recommend robocopy, but when I tried the scenario out, I found (much to my surprise) that it leaves the copied directories at the new dates, as described by you.

Total Commander, on the other hand, copies the timestamps of the directories, too.

like image 147
Helge Klein Avatar answered Oct 13 '22 11:10

Helge Klein


SynchronizeIt does that, just as good as Robocopy with a nice GUI and the option to easily see and select which files are going to be copied. http://www.grigsoft.com/wndsync.htm

(Beware though, there are extremely rare cases where this tool somehow corrupts the destination files – it happened to me with files downloaded with download managers, specifically FlashGet and Orbit Downloader, only the first 25kb were correctly copied, the rest was filled with zeros, I don't know the explanation. I've seen Robocopy fail too in equally rare instances – it was confused by similar file names, copied one file instead of the other and thus missed the other. So now I make sure to ALWAYS verify that the copy is perfect using Total Commander or WinMerge.)

like image 38
Gabriel Avatar answered Oct 13 '22 12:10

Gabriel