Solved

Copy files while keeping Date & Time Stamp intact

Posted on 2015-01-23
24
818 Views
Last Modified: 2015-02-09
I have multiple external hard drives that I have used for one reason or another. I am consolidating the various drives into one big NAS drive.  That catch is I need to keep the attributes and most important the date and time stamps intact when I consolidate them onto the new drive.  I know I can use xcopy from a command line but it can be tedious give the number of drives and files that have to be copied over. That is unless you have the right command syntax that allows for spaces in path names which I haven't been able to get to work.

So, I'm looking for a GUI based application that runs on Windows 7 that will allow me to copy from source to destination while keeping the attributes but more importantly the time stamp dates in tact.
0
Comment
Question by:Rafael
  • 9
  • 8
  • 5
  • +1
24 Comments
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
regarding the time stamp you mentioned above, which date/time attribute do you refer to? Create Time, Modify Time or Access Time? they are different time stamps for the same single file.
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
...the right command syntax that allows for spaces in path names...
I didn't know xcopy doesn't allow you to copy folders with spaces in the names. Mine works fine here. Still, it doesn't address your other issue...
...to keep the attributes and most important the date and time stamps intact...
For that, you can use Robocopy with the /DCOPY:DAT switches.

By default, directory timestamps are not copied over so you need the T switch in  /DCOPY:DAT

For file attribute info, you will want to look at these switches...
/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
  (copyflags : D=Data, A=Attributes, T=Timestamps).
  (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

/SEC :: copy files with SECurity (equivalent to /COPY:DATS)

/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU)

Open in new window


For a 3rd party, competing Robocopy, see http://www.xxcopy.com

Do you still prefer a GUI based application?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
Which NAS device would that be? Most consumer devices have USB port for copying from external HD to a folder on the NAS. That would also be an easy  way of copying all your data. After the copy you just move the files to a desired location as that does not modify timestamps.
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
@ bbao - I'm referring to create date. For example on some of the USB drives there are folders that contain pictures.  These folders and pictures are random but due to the date they were placed on the original drive I can tell the time era for example a trip to the beach.

@NewVillageIT - I think you may be right. Windows 7's explorer sees the file names in it's explorer with spaces, I just wasn't able to create the right syntax to copy say F:\users\family\My Pictures\Trip To Beach\files to  H:\My Pictures\Trip to Beach\Ocean City\2012  etc.  I will try Robocopy for the GUI and see if it helps.

@gerwinjansen - Although, I do have a NAS (FreeNas) used for backups for servers, on my home network, it was the wrong choice of words on my part.  I am actually using a Seagate 3TB Bakup Plus.

All,  the drives are connected to my laptop via the USB ports. I also have the other drives that were old internal drives from my old computers plugged into my other USB ports as needed.  The trick is copying them to the Seagate USB Drive.  So i.e. I have to copy a 250 GB drive (F:) and all it's contents keeping the create date/time the same to my new 3TB Seagate drive (H:)  Sure I can cut and paste or move but it loses the date/time stamp which is what I need.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
That Seagate is not a NAS, so I'd go for robocopy with the date option.

There are a few robocopy front-end gui's out there but I only use the command line. Just try one I'd say.
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
have a syntax ?
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
@Rafael. Do you need syntax for.....robocopy command-line?
- I thought you were going to try Robocopy GUI? https://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx
- That link also has RichCopy. Supposedly better than Robocopy. I haven't tried it tho.
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
I used both Robocopy and robocop robocopy and tried the below commands and they fail.

Robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff\*.* " I:\ /E /J /COPY:DAT /COPYALL /R:10 /W:5 /V /ETA

I used the following command and it failed.
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
Yours looks fine. Can you post your specific error?

/COPY:DAT is redundant. /COPYALL does it instead.

Do you have a /V: switch? I don't see one on mine. (I have windows 8.1)

Don't forget to use: /DCOPY:DAT

Another useful one is to log the results with /LOG+:Results.txt

EDIT: my bad. There is a /V switch, but not /V:

I think your error may be:
"F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff\*.*"

Open in new window


Try removing the \*.*
"F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff"

Open in new window

0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
Rafael. I edited my last post. Refresh your web page.
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
>> I'm referring to create date.

as mentioned above, robocopy is the right choice: official and free.

> I'm looking for a GUI based application

robocopy has a GUI based version, see here.

https://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx?pr=blog
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
@bbao - That's an add-on, you still need robocopy - so you're just repeating what I said ;)
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 150 total points
Comment Utility
Usage :: ROBOCOPY source destination [file [file]...] [options]

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir  (drive:\path or \\server\share\path).
file :: File(s) to copy  (names/wildcards: default is "*.*").

So:

robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff" I:\ /E /COPYALL /R:10 /W:5 /V /ETA

Open in new window


(I don't get your /J )
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
Perhaps something is not tick'ed correctly.  Either way I'm using the Robocopy from TechNet. I have attached screen shots and I can't attach a log as it does show up nor do the files copy over.

However, from the command line this seemed to work EXCEPT it dumped all the files rather than copying the Car Stuff folder and it's contents. Am I missing something ?

C:\Users\Rafael>robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff" I:\ /E  /R:10 /W:5 /V

So... ???
monitoring.png
logging.png
filters.png
copy-options.png
path.png
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
...it dumped all the files rather than copying the Car Stuff folder and it's contents
You mean none of the files are in I:\?
Instead, it should have copied the Car Stuff contents to I:\, but without the folder name Car Stuff. However, when your run...
Robocopy /DCOPY:DAT /E /R:10 /W:5 /V f:\ i:\ConsolidatedDrv01\

Open in new window

, it will copy all the files and folders on the drive, and keep the folder names intact. Notice that it creates the folder ConsolidatedDrv01 automatically. Also, notice the trailing \, i.e.  I:\ConsolidatedDrv01\.
When the first drive is done, you can run it again with the name ConsolidatedDrv02. And so on, for each drive.

In your copy-options image, I don't see the /DCOPY option. I'm not familiar with the GUI version.
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
@Gerwin: /J :: copy using unbuffered I/O (recommended for large files).
I have Windows 8.1 RT
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
@NewVillageIT  Yes it dumped everything into the root of I: however, it did not copy the Car Stuff folder.   I hoped it would have copied the entire folder and it's contents.
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
@Rafael. Yes, that's expected. See my prior post for explanation.

Your command:
robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff" I:\ /E  /R:10 /W:5 /V

Open in new window

As I mentioned, will copy the contents of "Car Stuff", but not the folder itself. In other words, just the folder "Car Stuff" is missing on the target.

...it dumped all the files...
At first, I thought it dumped=erased the files. LOL.
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
So how would I get that folder copied without having to create one first and then dump into it ?
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff\" I:\ /E  /R:10 /W:5 /V
0
 
LVL 10

Author Comment

by:Rafael
Comment Utility
that didn't create the folder of Car Stuff and drop the contents into it. Am I missing a switch ?
0
 
LVL 23

Accepted Solution

by:
NVIT earned 350 total points
Comment Utility
Sorry. You'll have to use:
robocopy "F:\Rafael\Documents and Settings\Rafael.NOVASTAR\Desktop\Car Stuff\" "I:\Car Stuff\" /E  /R:10 /W:5 /V

Are you choosing which folders to copy? I thought you are copying the whole drive?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
How about using a ZIP archive as intermediate?

Create a .zip file on your destination drive in a new subfolder, containing data from one of the USB drives.

Then move files from the .zip on the destination drive to it's proper place. Time stamps are as they were. You may have to move files into a new subfolder on the source drive first.
0
 
LVL 10

Author Closing Comment

by:Rafael
Comment Utility
Sorry for the delay guys. Been slammed at work. Was able to use what was given and just made it work. I still have to manually create the directories though.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now