Link to home
Start Free TrialLog in
Avatar of mrmad1966
mrmad1966

asked on

Robocopy Problem

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 ???
Avatar of sirbounty
sirbounty
Flag of United States of America image

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"
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,
Steve
Avatar of mrmad1966
mrmad1966

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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