Solved

Quick Help on Robocopy please

Posted on 2006-11-05
6
1,431 Views
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.
0
Comment
Question by:Nick Sui
  • 4
6 Comments
 
LVL 43

Accepted Solution

by:
Steve Knight earned 250 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
0
 
LVL 35

Author Comment

by:Nick Sui
ID: 17880590
Does Xcopy overwrite modified files?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17880731
Not if you use -Y  that is "don't overwrite".
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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!

Steve
0
 
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.

Steve
0
 
LVL 2

Assisted Solution

by:ScintillateRich
ScintillateRich earned 250 total points
ID: 18129797
Hi

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:

nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

or this:

n
n
n
n
n
n

etc...

(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.

Thanks

Richard
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

12 Experts available now in Live!

Get 1:1 Help Now