Solved

hot to use robocopy in windows 7

Posted on 2014-03-03
3
255 Views
Last Modified: 2014-03-03
if the source drive is S:
if the target drive is T:

c:\robocopy r: t: /E

this will copy everything including empty folders.

now, lets say 2 weeks goes by. i want to copy only the new stuff and anything that is different and forget about the files that hasnt changed. how do i go about dong this?

thanks
0
Comment
Question by:ttrbrtsn
3 Comments
 
LVL 82

Assisted Solution

by:oBdA
oBdA earned 166 total points
Comment Utility
You just run the same command again; robocopy will by default skip files that already exist in the target folder (same time, same size).
if you want to delete files in the target folder that have been deleted in the source folder, replace the /E with a /MIR.
0
 
LVL 28

Accepted Solution

by:
becraig earned 167 total points
Comment Utility
use /XO

 /XO => exclude old files i.e. files on source that also exist at the destination but has older or same timestamp.

c:\robocopy  r: t: /E /XO
0
 
LVL 51

Assisted Solution

by:Bill Prew
Bill Prew earned 167 total points
Comment Utility
It's important to know exactly what you want to accomplish.  By default, as mentioned, ROBOCOPY runs in "mirror" mode (/MIR) where it will try and make the destination look just like the source folder at the point in time ROBOCOPY runs.  This means copying new or updated files, but also deleting any files from the destination that no longer exist in the source.

/XO on the other hand copies new and updated files, but leaves any files in the destination that exist without a matching file in the source.

~bp
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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

9 Experts available now in Live!

Get 1:1 Help Now