Quick Help on Robocopy please

Posted on 2006-11-05
Medium Priority
Last Modified: 2008-02-07
what we want to do :

1. Shouldn't overwrite from source to destination regardless of the file age or timestamp.
2. Copy files on or after a certain date.
Question by:Nirmal Sharma
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
  • 4
LVL 43

Accepted Solution

Steve Knight earned 1000 total points
ID: 17880115
You could just use :
xcopy /d:mm-dd-yy /-y source dest

but for robocopy I think you need:

robocopy /XC /XN /XO /MINAGE:5 source dest

Should exclude changed, newer, older files (i.e. all that exist) and then copy anything newer than 5 days old (or put date in place of it).

Test it with the /L switch to make sure it is copying the correct files, sorry I can't test it at the mo. for you
LVL 35

Author Comment

by:Nirmal Sharma
ID: 17880590
Does Xcopy overwrite modified files?
LVL 43

Expert Comment

by:Steve Knight
ID: 17880731
Not if you use -Y  that is "don't overwrite".
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

LVL 43

Expert Comment

by:Steve Knight
ID: 17880738
Ignore me there.  Was thinking the other way around -- -Y will just PROMPT to not overwrite.  Not much use!

LVL 43

Expert Comment

by:Steve Knight
ID: 17880749
One sure fire way is to make sure the account you schedule it as BTW only has create / modify rights at NTFS level and no DELETE rights.  Have a go with the robocopy options above.  I will try myself later if I can.


Assisted Solution

ScintillateRich earned 1000 total points
ID: 18129797

Sorry, not too sure about robocopy, but can be done with xcopy using this command:

xcopy /d:mm-dd-yy /-y < n.txt

Then createa a file called n.txt and put lots of 'n's in it like this:


or this:



(You need enough to account for each time it prompts for you to overwrite or not)

This will cause it to prompt on overwrite, and will take the answer from the n.txt file.

I'm just trying this out myself and it seems to be working.



Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

777 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