Solved

hot to use robocopy in windows 7

Posted on 2014-03-03
3
276 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
[X]
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
3 Comments
 
LVL 85

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 56

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

630 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