Solved

Quick Help on Robocopy please

Posted on 2006-11-05
6
1,438 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:Nirmal Sharma
  • 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:Nirmal Sharma
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
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Print Server: How to Create it? 1 775
Active Directory Replication 10 1,148
Hyper V Virtual Machine not showing on Local Network 3 666
Referencing a mapped drive 6 141
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…
This article was originally published on Monitis Blog, you can check it  here .   Some years back, I worked as the CTO.  During my tenure, I had a head of IT support reporting to me.  He did his job quite well and had a commendable sense of duty…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

697 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