Solved

hot to use robocopy in windows 7

Posted on 2014-03-03
3
262 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 83

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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