Solved

hot to use robocopy in windows 7

Posted on 2014-03-03
3
266 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 84

Assisted Solution

by:oBdA
oBdA earned 166 total points
ID: 39901236
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 29

Accepted Solution

by:
becraig earned 167 total points
ID: 39901239
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 53

Assisted Solution

by:Bill Prew
Bill Prew earned 167 total points
ID: 39901254
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert JPG to PDF file 4 99
Running Multiple Access Macros from batch file or vba 19 412
Batch file output 20 92
Coding yesterday's date 3 38
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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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