[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Robocopy is not overwriting time stamps on target

Posted on 2013-12-03
5
Medium Priority
?
2,700 Views
Last Modified: 2013-12-03
I'm trying to run robocopy as a batch file on Windows 7, such that time stamps on the target will be overwritten if the source time stamps differ.  This seems to be working for directory time stamps but not file time stamps.  Could you correct my code, or advise me how to attain the intended result?

Echo Off
Echo. -------- Copying Files  --------
"C:\Windows\System32\robocopy.exe" [source]  [target] /b /e /copyall /mir /dcopy:T > "V:\My Documents\Computer\robocopy.log"
Echo. ---------- Copy Completed ------------
exit
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:ButlerTechnology
ID: 39693889
I think that your /CopyAll attribute is missing the T flag.
/copyall:T

Open in new window

Tom
0
 

Author Comment

by:ddantes
ID: 39693897
Thank you.   Will this flag also work?   /TIMFIX
0
 
LVL 6

Expert Comment

by:ButlerTechnology
ID: 39693910
I think that one would be better.
Tom
0
 
LVL 18

Accepted Solution

by:
Steven Harris earned 1000 total points
ID: 39693924
/DCOPY:T : Copy Directory Timestamps.  This will not update files.

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

/TIMFIX : FIX file TIMes on all files, even skipped files.

You should be looking into /copyall or /timfix
0
 

Author Closing Comment

by:ddantes
ID: 39693957
Thanks to both Experts.  I couldn't award points for the first answer, because copyall:T returned an "invalid parameter" error in the log file.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

650 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