Jump to content

Recommended Posts

Posted

Does anybody have a script that will merge two folders together but only transfer files from the first folder with they don't exist or are newer then those in the second?

 

Trying to do a bit of a botch restore of data!

Posted

robocopy Source Dest /S /XO

 

Is include subfolders, and exclude older.

 

/XO : eXclude Older - if destination file exists and is the same date
                    or newer than the source - don’t bother to overwrite it.

 

Steve

  • Thanks 1
Posted
Adding the \ + Robocopy's own \ makes it escape char ", such that you actually use it in the string :)

 

Steve

 

Thanks!! Running now - I had tried removing the \ from the source but not destination.

  • 4 weeks later...
Posted
Not quite the same, but I've copied user home files over to a new server but before we move the users over I want to run robocopy again to pickup any of the files which have been updated or created while we have done this. Can I just add the switch /s /xo to my existing command so I don't copy everything again?
Posted
Not quite the same, but I've copied user home files over to a new server but before we move the users over I want to run robocopy again to pickup any of the files which have been updated or created while we have done this. Can I just add the switch /s /xo to my existing command so I don't copy everything again?

 

It'll exclude older files (and same etc), but only if in same position etc. If I move ABC.doc into a folder, it's a new file etc, but in terms of what you're saying yes it should do it :) Make sure it's upper case though, think there's lower case on robocopy too

 

Steve

  • Thanks 1
Posted

I did run a quick test and it seemed to work, but I used lower case so will change that in case it causes problems before running it with live data.

 

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...