?
Solved

Robocopy

Posted on 2014-03-31
7
Medium Priority
?
462 Views
Last Modified: 2014-03-31
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
0
Comment
Question by:introlux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 

Author Comment

by:introlux
ID: 39966557
And to skip open files
0
 

Author Comment

by:introlux
ID: 39966584
also keep security/ntfs permisions
0
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 2000 total points
ID: 39966609
Hi,

/XN mean " Excludes newer files."

and use /R:2 so that any open files will be skipped after 2 attempts.

/sec

for security

so final command will looks like

robocopy "\\Oldlocation\Files" "\\NewLocation\Files"  /XC /IS /SEC /R:2
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:introlux
ID: 39966690
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.
0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39966733
Hi,

please go with GUI mode of ROBOcopy and select your required options.
Microsoft-Robocopy-GUI-Users-Gui.doc
0
 

Author Comment

by:introlux
ID: 39966809
I needed this: /XO /IS /SEC /R:2 /E

All working fine now. Thanks!
0
 

Author Closing Comment

by:introlux
ID: 39966810
/XO /IS /SEC /R:2 /E
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question