Seems simple, but I can't figure it out...I need a sync program that will overwrite all destination files, copy all new source files to destination (creating directories if needed), but not overwrite newer files in the destination. Specifically, I'm looking for the syntax to make this work with either RoboCopy or XXCopy. Really any program is fine, but I've tried UltraEdit's compare util, SyncBack, Vice Versa, SuperFlexible Sync, GoodSync, WinMerge, etc and can't find one that will overwrite all but leave newer destination files alone.
If no one here knows, can someone point me to a more proper forum for such an issue?
The source should remain untouched. Thanks for your help!
- Follow via:
- RSS
- Email Alert
Question
0
Votes
RoboCopy or XXCopy...whatever, I need syntax!?
21st Feb 2008
Answers (4)
0
Votes
Not sure
However using /purge with robocopy will delete all dir/files that no longer exist in the source!
21st Feb 2008
0
Votes
Not Helpful
That wasn't much of an answer, was it, ComputerCookie?
How'd you go, markoalleno?
FWIW, Total Commander has an excellent 'Synchronize Directories' (American spelling) function. Under Commands.
See if that helps.
How'd you go, markoalleno?
FWIW, Total Commander has an excellent 'Synchronize Directories' (American spelling) function. Under Commands.
See if that helps.
20th Feb
Replies
i'm hoping the OP has it fixed by now, it's only been four years
Purpleskys
TR Moderator
Purpleskys
TR Moderator
PurpleSkys
21st Feb
Actually it's been 5 (FIVE!!) years! If it took you 5 years to come up
with Total Commander, which is completely off-topic for the OPs
question, how long did it take you to finish grade school?
Yes, I'm being very BRUTAL, if you can't take it, then next time
LOOK AT THE DATE before you make a fool of yourself.
Oh, one last item, when it's been 5 years, it is extremely rude
to belittle someone that tried to answer a question.
Wizard57M
TR Moderator
with Total Commander, which is completely off-topic for the OPs
question, how long did it take you to finish grade school?
Yes, I'm being very BRUTAL, if you can't take it, then next time
LOOK AT THE DATE before you make a fool of yourself.
Oh, one last item, when it's been 5 years, it is extremely rude
to belittle someone that tried to answer a question.
Wizard57M
TR Moderator
wizard57m-cnet
21st Feb
Harsh....
As long as the OP didn't use /mir he was probably ok.
As long as the OP didn't use /mir he was probably ok.
Slayer_
21st Feb
0
Votes
ROBOCOPY
I'm a first time poster. I tried answering this several times. It doesn't seem to accept for some reason. I'll try several smaller answers...
21st Feb
Replies
That didn't work in IE9. Trying Chrome.
donr484
21st Feb
Chrome didn't work either. I had a URL pointing to the ROBOCOPY command line reference. Maybe this site didn't like the URL. Trying again without it...
donr484
21st Feb
That did it! I couldn't including the link to the ROBOCOPY command line in TechNet for whatever reason. The appropriate answer is below if it is still needed or can help others.
donr484
21st Feb
0
Votes
ROBOCOPY Command Line
I think you'd want to use this command line:
ROBOCOPY \\sourcepc\sourceshare \\destinationpc\destinationshare /COPYALL /B /E /XN /R:10 /W:2 /LOG:\\loggingpc\logfileshare\logfile.txt /NFL /NDL
Options:
/COPYALL copies all file attributes from source
/B uses backup mode
/E copy subdirectories including empty ones
/XN skips newer files already in the detination
/R:10 /W:2 will attempt with 10 retries and 2 seconds between each
/NFL don't include every file name in log (for a summary count)
/NDL don't include every folder name in log (for a summary count)
Note:
If you want to list all the folders and files affected in the log, remove /NFL /NDL
---
I usually build a summary log file, overwriting the last one. Then I use a vbscript to email the text of log file when it completes.
ROBOCOPY is very robust and flexible. On a WAN where manually copying and pasting 2GB+ files causes older WatchGuard Fireboxes to crash, ROBOCOPY will copy dozens of GBs of huge SQL BAK files over the internet without fail.
You can also specify complex scenarios like only copy the newest source file that starts with a certain name to the destination from specific sub folders in the source, which is great for folders containing timestamped filenames.
Hope it helps!
ROBOCOPY \\sourcepc\sourceshare \\destinationpc\destinationshare /COPYALL /B /E /XN /R:10 /W:2 /LOG:\\loggingpc\logfileshare\logfile.txt /NFL /NDL
Options:
/COPYALL copies all file attributes from source
/B uses backup mode
/E copy subdirectories including empty ones
/XN skips newer files already in the detination
/R:10 /W:2 will attempt with 10 retries and 2 seconds between each
/NFL don't include every file name in log (for a summary count)
/NDL don't include every folder name in log (for a summary count)
Note:
If you want to list all the folders and files affected in the log, remove /NFL /NDL
---
I usually build a summary log file, overwriting the last one. Then I use a vbscript to email the text of log file when it completes.
ROBOCOPY is very robust and flexible. On a WAN where manually copying and pasting 2GB+ files causes older WatchGuard Fireboxes to crash, ROBOCOPY will copy dozens of GBs of huge SQL BAK files over the internet without fail.
You can also specify complex scenarios like only copy the newest source file that starts with a certain name to the destination from specific sub folders in the source, which is great for folders containing timestamped filenames.
Hope it helps!
21st Feb
Replies
The retries options are for network failures. If you are copying from one local folder to another, you can probably remove /R:10 /W:2
If you are copying really large files over the internet or a particularly bad network connection, you can increase the number of retries and the wait time between each as well.
If you are copying really large files over the internet or a particularly bad network connection, you can increase the number of retries and the wait time between each as well.
donr484
21st Feb
Sometimes its good to put some time between each packet as well so you don't hog the network connection to yourself for a long time.
Slayer_
22nd Feb
I just noticed my command line got truncated above. All the options are listed below it at least. There are some issues with posts on this site.
donr484
22nd Feb

































