0

How can I preserve the date and time information when I move files to another disk drive?

I would like to preserve the last modified date and time, and also the creation date and time. I want to basically preserve as much as I can about that file, without altering it in any way.

I have come across discussions about the robocopy command. But this seem to work only when you copy whole directory trees, together with the files. So what if I only want to copy 1 single file? Are there any other alternatives?

As a side note, I am not looking for a way to copy the file, I would like to move it, not copy it. But perhaps that can be arranged by simply copying it first and then deleting the original source file. But it may not work in the same command, so it would have to be a two step process.

One workaround that I have come across is to archive the original file into a ZIP file, move it to the destination, extract it from ZIP. Then remove the ZIP file and the source file. But this seems very tedious work and time consuming, especially when dealing with large files. Of course you don't have to wait for compressing the file, you can just archive it in a ZIP file without compression. But it's still tedious.

3
  • Take a look at this similar question: superuser.com/questions/146125/…
    – amiregelz
    Aug 8, 2012 at 11:33
  • Thanks! Looks like the Robocopy GUI has been discontinued. It has been replaced with RichCopy, and it looks like this new tool offers the option to "move" the files instead of copying them. I will try this one. And to answer my question about robocopy, is it possible to use it to copy single files? What would the command syntax for this look like? Again, I am not after mirroring complete directory trees.
    – Samir
    Aug 8, 2012 at 17:17

2 Answers 2

0

according to the source below: you can copy them using robocopy while preserving the original time stamp you can specify a specific file, or a entire folder. source : http://en.wikipedia.org/wiki/Robocopy

For example: to copy the file named exampletextfile.txt from directory c:\here to c:\there, you could type the following :

Robocopy c:\here c:\there exampletextfile.txt

however a better source would be: http://technet.microsoft.com/en-us/magazine/ee851678.aspx including more examples and detailed information.

0

I use XXCOPY. It can preserve date and time for files or directories with the following switches:

/TCW // copy last-write timestamp (default) /TCW0 // do not copy last-write timestamp

/TCC // copy creation timestamp /TCC0 // do not copy creation timestamp (default)

/TCA // copy last-access timestamp /TCA0 // do not copy last-access timestamp (default)

/TC Shortcut for /TCA/TCC/TCW (copies all three types of timestamps) /TC0 Shortcut for /TCA0/TCC0/TCW0.

For more information, see this page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .