Solved

Robocopy Problem

Posted on 2007-04-03
6
759 Views
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 ???
0
Comment
Question by:mrmad1966
  • 3
  • 2
6 Comments
 
LVL 67

Expert Comment

by:sirbounty
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"
0
 
LVL 30

Expert Comment

by:SteveGTR
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,
Steve
0
 
LVL 1

Author Comment

by:mrmad1966
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
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 67

Accepted Solution

by:
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
0
 
LVL 30

Assisted Solution

by:SteveGTR
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
0
 
LVL 30

Expert Comment

by:SteveGTR
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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