Link to home
Start Free TrialLog in
Avatar of introlux
introluxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Robocopy

Hi,

Looking for a command to do the following:

COPY FILE AND FOLDER THAT ARE:

Copy/overwrite same file with the exclusion if the file is newer/modified

I have the following script:

robocopy "\\Oldlocation\Files" "\\NewLocation\Files" /XN /XC /IS

Does not seem to keep the newer file, it overwrites it.

Any help will be appreciated.

Regards,

introlux
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

And to skip open files
also keep security/ntfs permisions
ASKER CERTIFIED SOLUTION
Avatar of Santosh Gupta
Santosh Gupta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This does not work. anything that is modified also needs to be skipped. This is basically new files or existing files with a newer modified timestamp.
Avatar of Santosh Gupta
Santosh Gupta

Hi,

please go with GUI mode of ROBOcopy and select your required options.
Microsoft-Robocopy-GUI-Users-Gui.doc
I needed this: /XO /IS /SEC /R:2 /E

All working fine now. Thanks!
/XO /IS /SEC /R:2 /E