Help with Robocopy command

Associate
Joined
1 Aug 2007
Posts
1,065
Hi all,

I need some help with a robocopy command.

I have two folders..

Current Folder (Contains updated files but is missing folders and files)

Recovered Folder (Contains the missing folders and files but also has files which have since been updated so I don't want them copied.)

How do I copy the missing folders and files to the current folder but not overwrite the files which have since been updated. I also want to make sure any new folders aren't removed because they don't exist in the source (Recovered folder).

Please help :)
 
I use the following to copy my pictures/videos onto my backup - it copies them across, but if the file exists and is newer then it ignores it:

robocopy Source Destination /MIR /XO

I find the best way to test it is to make a couple of folders and play until you get the best results - robocopy /? will give you the list of switches :)
 
Last edited:
Thanks for the replies.

robocopy Source Destination /MIR /XO

The problem with a MIR is that..

/MIR specifies that robocopy should mirror the source directory and the destination directory. Note that this will delete files at the destination if they were deleted at the source

I want to keep any newly create folders in the destination.
 
I think you want something more along the lines of:

robocopy Source Destination /COPYALL /DATSOU /R:0 /W:0

That should skip newer files but copy everything over. /MIR is very dangerous as if something new was created in the destination but didn't exist in the source, it would be deleted.
 
Thanks morfmedia and everyone else.

Managed it in the end. I used Rich copy which is the advanced gui for robocopy.

Did some testing with dummy files and then went for it :)
 
Back
Top Bottom