Robocopy Problem

Posted on 2007-04-03
Last Modified: 2009-10-29
Hi All..Please put me right. i am trying to both schedule a robocopy operation and log the results. This is my syntax:-
robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:"C:\Log Files\Backup\packagecopy.log"

What happens is the dos shell flashes on then off the screen with no copy..What have I got wrong here ???
Question by:mrmad1966
  • 3
  • 2
LVL 67

Expert Comment

ID: 18843821
What's in your log file?
Try it from a command prompt...or use this:

Start->Run->Cmd /k robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:"C:\Log Files\Backup\packagecopy.log"
LVL 30

Expert Comment

ID: 18843932
If you are scheduling this as a task using the default system account, it will not have the rights to access network resources and will fail. You should change the task to run as a domain user will sufficient rights to the network resources.

Good Luck,

Author Comment

ID: 18844630
What's in your log file?
Nothing...It does not get to the point of being created.. Am I correct in assuming this log file SHOULD be a record of the copy operation ?

Steve, the permissions are fine. If I run the same same command but miss of the /LOG option it runs sweet !

Mr Bounty ! what is the /k switch for ???
Thank /you
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

LVL 67

Accepted Solution

sirbounty earned 63 total points
ID: 18844725
the /k simply states to leave the command window open after processing.
I thought that since it's disappearing that this could present the trouble to you...

If you run it fine from a command prompt without the log switch, then I'd suggest using the short name and leave out the quotes:

robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log
LVL 30

Assisted Solution

SteveGTR earned 62 total points
ID: 18845092
You might also redirect the standard error to help debug the problem.

robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log 2>c:\debug.txt
LVL 30

Expert Comment

ID: 18845110
Another thing you might want to do is fully qualify the path where robocopy is located. The scheduled task may not have the path set to automatically locate robocopy. For example:

"c:\program files\program\robocopy" \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

23 Experts available now in Live!

Get 1:1 Help Now