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
Solved

Quick Help on Robocopy please

Posted on 2006-11-05
6
1,436 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL SERVER 2000 mdf file defragmentation 4 56
Server 2008 Server 2003 Server 2000 12 644
Application Deployment - Simple 7 652
Windows 2000 Sever Lab Setup 1 685
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…
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 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