Solved

Robocopy

Posted on 2014-03-31
7
455 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
  • 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 500 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
Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

 

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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

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

Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now