drifty
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:
Code: Select all
ERROR 123 (0x0000007B) Accessing Destination Directory The filename, directory name, or volume label syntax is incorrect.
This is the batch file i am using:
Code: Select all
Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate" *.* /B /ETA /TEE /s /COPY:DT /R:1 /W:1 /LOG+:log.txt
----------------------------
#2 08 Mar 2013 05:30
drifty
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?
----------------------------
#3 09 Mar 2013 03:36
Ocalabob
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:
Code: Select all
Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate2" *.* /B /ETA /TEE /s /COPY:DT /R:1 /W:1 /LOG+:log.txt
That's all I can come up with for now.
Best wishes!
----------------------------
#4 09 Mar 2013 04:31
Ocalabob
Drifty,
I can not replicate your source folder but I did give your Robocopy code line a test. Here's what I did:
Code: Select all
::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!
----------------------------
#5 11 Mar 2013 13:58
bluesxman
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.
Code: Select all
Robocopy "\\homes-us\officedata\ca\Projects" "E:\Duplicate" /s /R:1 /W:1
cmd | *sh | ruby | chef
----------------------------
#6 18 Mar 2013 15:33
drifty
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.