Solved

using Robocopy

Posted on 2011-02-16
6
411 Views
Last Modified: 2012-05-11
Hi,
I am using Robocoy to copy files inbetween our differenent locations.  Working well.  I need to know the switches to put on so that robocopy copies only files that have changed or any new ones added once the full copy is already run on a particular folder to save time and bandwidth.
At the moment I am using
robocopy souce destination /MIR /SEC
Help plz
0
Comment
Question by:amanzoor
  • 2
  • 2
  • 2
6 Comments
 
LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 250 total points
ID: 34907648
As I understand it, the way you're using it should work the way you want it to.
0
 
LVL 23

Accepted Solution

by:
jakethecatuk earned 250 total points
ID: 34907766
if you use /MIR, then files that no longer exist on the source will get purged from the destination - is that what you want?

also, you will not copy over any subfolders with your current syntax - consider adding /E if you want subfolders as well (I always put it in just in case folders get created)

adding /ZB should help avoid any access problems that you may come up against - can hepl with locked files.

adding /R:1 /W:1 will retry once and wait 1 second before trying again - useful with locked files.

/tee /log:{filename} will output what's going on to a file as well as a screen.

aside from that, your original command will work fine.
0
 
LVL 4

Author Comment

by:amanzoor
ID: 34907777
one more thing:  I am calling my script which is bak.bat from windows task schedular on server 2008.  Is there a way once the script is called by task schedular, it should actually show me the Dos window on screen where its running the files which are copied?
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 34907836
I think that will only happen if you're logged in as the user whose credentials are being used to launch the script.  That is, if you're logged in as administrator, and you're using the administrator account to run the batch file, you may see the command prompt.  Don't hold me to that.
0
 
LVL 23

Expert Comment

by:jakethecatuk
ID: 34907847
As I mentioned before, the '/tee /log:{filename}' command may help you as it will output what's going on to a file as well as a screen.  If you don't want it to screen, drop the '/tee' bit.
0
 
LVL 4

Author Closing Comment

by:amanzoor
ID: 34909149
Thanks Gentlemen, I really appreciate your time.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

821 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