Solved

using Robocopy

Posted on 2011-02-16
6
408 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 33

Assisted Solution

by:paulmacd
paulmacd 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 33

Expert Comment

by:paulmacd
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

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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 configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

707 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

16 Experts available now in Live!

Get 1:1 Help Now