Solved

Quick Help on Robocopy please

Posted on 2006-11-05
6
1,434 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Application Deployment 2 254
WMI Uptime Script Reporting Incorrect Number on W2k Server 16 768
windows explorer 21 175
P2V Windows Server 2000 - Network Issue 14 48
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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

816 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