#1 08 Mar 2013 00:16

drifty
Member
Registered: 28 Nov 2007
Posts: 122

Robocopy error Accessing Destination Directory

I have a USB drive connected to a windows 7 machine and planned on running robocopy from the USB drive to copy several folders from the Windows 7 machine to a folder i have already created on the usb drive. However when I run the batch file it creats the folder and copies one file then displays the error:

ERROR 123 (0x0000007B) Accessing Destination Directory The filename, directory name, or volume label syntax is incorrect.

It will go to the next folder and do the same thing. I made sure i have local admin rights on the machine and was able to run my batch file with the /L switch just fine. So I can read but not copy the files.

This is the batch file i am using:

<CODE>
Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate" *.* /B /ETA /TEE /s /COPY:DT /R:1 /W:1 /LOG+:log.txt

Any help would be greatly appreciated.

Offline

#2 08 Mar 2013 00:55

RG
Member
From: Minnesota
Registered: 18 Feb 2010
Posts: 338

Re: Robocopy error Accessing Destination Directory

Removing...

Last edited by RG (08 Mar 2013 13:14)


CMD and InstallShield

Offline

#3 08 Mar 2013 05:30

drifty
Member
Registered: 28 Nov 2007
Posts: 122

Re: Robocopy error Accessing Destination Directory

I have used .rcj files  the *.* to copy all files. So when i tried a simple version without the job file i assumed the *.* was needed. Also the job file was called from this same location in a batch file. So you're saying i don't need the *.* and that is causing the problem? Where would a better place be?

Offline

#4 09 Mar 2013 03:36

Ocalabob
Member
Registered: 21 Feb 2013
Posts: 7

Re: Robocopy error Accessing Destination Directory

Greetings Drifty,

Your Robocopy lines look good to me.
"ERROR 123 (0x0000007B) Accessing Destination Directory The filename, directory name, or volume label syntax is incorrect."
is a WIN error code and not Robocopy error code. The problem lies in the destination folder. Are there existing folders/files in E:\Duplicate?

Try letting Robocopy create the destination folder for you, for example:

Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate2" *.* /B /ETA /TEE /s /COPY:DT /R:1 /W:1 /LOG+:log.txt 

You may want to consider dropping the *.* or extend your quotes to cover the entire portion of the destination folder.

That's all I can come up with for now.

Best wishes!

Offline

#5 09 Mar 2013 04:31

Ocalabob
Member
Registered: 21 Feb 2013
Posts: 7

Re: Robocopy error Accessing Destination Directory

Drifty,
I can not replicate your source folder but I did give your Robocopy code line a test. Here's what I did:

::Robo_test.bat
@echo off
Robocopy "c:\utilities\7-Zip" "E:\Duplicate" *.* /B /s /ETA /TEE /COPY:DT /R:1 /W:1 /LOG+:log.txt
pause
 

Using WIN 7 with Robocopy and the batch file on a USB drive E:\ I got the expected results.

Best wishes!

Offline

#6 11 Mar 2013 13:58

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,041

Re: Robocopy error Accessing Destination Directory

Can't see anything obviously wrong.  I have had issues a bit like that when writing to a network share -- the file is created OK, but is momentarily inaccessible when it comes to applying the attributes/ACL (due to the file server doing something in the background).

You could try simplifying the command line and see if it helps/changes the error
e.g.

Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate" /s /R:1 /W:1 

NB - *.* is implied, so not necessary.


cmd | *sh | Ruby | Chef | Puppet | PowerShell | AutoIT3

Offline

#7 18 Mar 2013 15:33

drifty
Member
Registered: 28 Nov 2007
Posts: 122

Re: Robocopy error Accessing Destination Directory

After trying several options i tried Robocopy version 26 and it actually worked using the original batch file.
The machine was a laptop running windows 7 pro. I haven't seen this before and have no idea why it happened this time.
Unfortunately we had to return the customer machine so i won't be able to work on it anymore. Thanks to everyone who replied to the post.

Offline

#8 10 Mar 2014 11:21

jayden82821
New Member
Registered: 10 Mar 2014
Posts: 1

Re: Robocopy error Accessing Destination Directory

Long path tool can helpful on this situation. THanks

Offline

Board footer

Powered by FluxBB