robocopy help - urgent

Author
Discussion

N10k

Original Poster:

5,092 posts

234 months

Saturday 19th June 2010
quotequote all
troops im trying to copy some files from server1 to server 2

robocopy “\\server1\DATA$\Directors” "\\server2\Data\Directors\Directors" /E /COPY:DATOU /R:10 /W:30 /LOG:c:\Directors.txt

Im on server2, windows server 2008 and the log file says:
2010/06/19 10:13:38 ERROR 3 (0x00000003) Accessing Source Directory C:\"\server1\DATA$\Directors"\
The system cannot find the path specified.

Why is C:\ there at the front of the source directory?


Ta

TonyToniTone

3,420 posts

248 months

Saturday 19th June 2010
quotequote all
Not sure but can you browse to \\server1\DATA$\Directors ?

holloway_dave

439 posts

206 months

Saturday 19th June 2010
quotequote all
You're definitely not running it as part of a script or something?

As something else to try - map the drive for the source (so in the robocopy command, source will be say z:\directors or something), and reference the local path (destination) using local directories 'ie d:\whatever"

Edited by holloway_dave on Saturday 19th June 10:47

itsnotarace

4,685 posts

208 months

Saturday 19th June 2010
quotequote all
Try

robocopy \\server1\DATA$\Directors D:\Data\Directors\Directors /E /COPY:DATOU /R:10 /W:30 /LOG:c:\Directors.txt

(subsituting D:\Data\Directors\Directors for wherever the local path is located

Also beware of UAC on 2008, might need to spawn the argument within a cmd shell that has been launched as admin



Edited by itsnotarace on Saturday 19th June 12:39

itsnotarace

4,685 posts

208 months

Saturday 19th June 2010
quotequote all

TonyToniTone

3,420 posts

248 months

Saturday 19th June 2010
quotequote all
itsnotarace said:
Try

robocopy \\server1\DATA$\Directors D:\Data\Directors\Directors /E /COPY:DATOU /R:10 /W:30 /LOG:c:\Directors.txt

(subsituting D:\Data\Directors\Directors for wherever the local path is located
The error is coming from the source rather than the destnation.

lestag

4,614 posts

275 months

Saturday 19th June 2010
quotequote all
the quotes " may be confusing it. No need for them in the example you have given as no spaces in the directory names

also there is gui front end available thaty may help you.
http://en.wikipedia.org/wiki/Robocopy#GUI_front-en...

itsnotarace

4,685 posts

208 months

Saturday 19th June 2010
quotequote all
TonyToniTone said:
The error is coming from the source rather than the destnation.
Quotation marks were also removed

The_Jackal

4,854 posts

196 months

zollburgers

1,278 posts

182 months

Saturday 19th June 2010
quotequote all
Sorry, I can't help but just want to say that Robocopy is an awesome term.

TonyToniTone

3,420 posts

248 months

Saturday 19th June 2010
quotequote all
itsnotarace said:
TonyToniTone said:
The error is coming from the source rather than the destnation.
Quotation marks were also removed
?

You used a local path to the destination folder c:\, when the error is with source folder on a remote server \\.

N10k

Original Poster:

5,092 posts

234 months

Saturday 19th June 2010
quotequote all
Thanks people.
For some reason once i removed the " and re added them it worked?

took 12 hours to finish the batch job!

lestag

4,614 posts

275 months

Monday 21st June 2010
quotequote all
N10k said:
Thanks people.
For some reason once i removed the " and re added them it worked?

took 12 hours to finish the batch job!
FWIW, I did notice your quotes were different on source (sloping quotes) and destination (vertical quotes) in your original post. I thought it was just a PH quirk... as my keyboard has only one type of quotes.

itsnotarace

4,685 posts

208 months

Monday 21st June 2010
quotequote all
TonyToniTone said:
You used a local path to the destination folder c:\, when the error is with source folder on a remote server \\.
There is no need to specify quotation marks when using a UNC path with no spaces, so I removed them from the line I pasted. This undoubtedly resolved the issue.

There is also no need to specify a full UNC path for the local destination, which is what OP said he was doing:

N10k said:
troops im trying to copy some files from server1 to server 2

robocopy “\\server1\DATA$\Directors” "\\server2\Data\Directors\Directors" /E /COPY:DATOU /R:10 /W:30 /LOG:c:\Directors.txt

Im on server2
You only need to specify a UNC path for the destination when you are running the robocopy ommand from a third server. Get it now?

TurricanII

1,516 posts

197 months

Tuesday 22nd June 2010
quotequote all
+1 the quotes are very particular in Robocopy, i.e. don;t use them if you do not have a space in the path as previously mentioned. Also, the final backslash on the path has caused me grief before. I can't remember if I had to leave it on or off to get around a wierd error. Finally, I have been slapped in the head by a quotes problem before. I wrote up some documentation in Word and then copied the command line from Word into a batch file. Word kindly monged the quotes and turned them into the slanty ones that LOOK like quotes but do not work in a config file or batch file. The answer is to delete and retype the quotes whilst editing your batch file in Notepad

TonyToniTone

3,420 posts

248 months

Tuesday 22nd June 2010
quotequote all
itsnotarace said:
There is also no need to specify a full UNC path for the local destination, which is what OP said he was doing:
He was on server2 so the source path cannot be C:\ it has to be \\

and the error was with the source not the destination.

itsnotarace

4,685 posts

208 months

Tuesday 22nd June 2010
quotequote all
Oh dear this seems to be a difficult topic for you to grasp

itsnotarace said:
robocopy \\server1\DATA$\Directors D:\Data\Directors\Directors /E /COPY:DATOU /R:10 /W:30 /LOG:c:\Directors.txt
You will note that the above line copies from source to destination. Source being server1 and destination being a local path as he is performing the copy from server2 itself

TonyToniTone said:
and the error was with the source not the destination.
No, the error was the leading quotation marks, which again you will note I deleted from the line I pasted last week

If you can't figure that out, I give up trying to explain it.

Edited by itsnotarace on Tuesday 22 June 08:40