Solved

Robocopy

Posted on 2014-03-31
7
461 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 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

688 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