Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Robocopy (or XCopy) without overwriting existing files? 1

Status
Not open for further replies.

jasonp45

Programmer
Aug 23, 2001
212
US
I want to write a VBScript which syncs two folders (I know there are other ways to do this but this way suits the task at hand, assuming of course I can figure this key part out;). One folder is the master and the other is basically a clone/backup that I want to keep up to date by running the script via scheduled task. I want the files to be natively accessible otherwise I'd do a backup.

I could reset the archive bits or explicitly search the target folder and compare filenames when copying so as not to overwrite, but what I'd really like is a switch for the Robocopy (or XCopy) command which indicates "Do not overwrite existing files". XXCopy has just such a switch but I'd prefer to use a built-in tool if possible.

I've looked through all the switches but it's not clear to me that any of them does this. Is there a switch I'm not reading correctly (or some way to combine switches) to achieve this? Thanks.

Barring that I guess I'll appreciate tips on alternate ways to achieve the folder-cloning and daily updating ;).
 
You can use robocopy with the /MIRROR option which will mirror the contents of source/dest.
 
or you could use DFS...

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top