Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using Robocopy

Posted on 2011-02-16
6
Medium Priority
?
415 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
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 1000 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 1000 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This program is used to assist in finding and resolving common problems with wireless connections.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

721 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