robocopy error

K

kapibarra

Hello.

I am trying to use robocopy in order to automate my backup. I run the
below command from the command line and in the log file I get the error:

"ERROR 123 (0x0000007B) Accessing Source Directory
C:\Users\class1\"C:\Users\class1"\
The filename, directory name, or volume label syntax is incorrect."

The directory is there, the path is specified in the command exactly as
it shows up in windows (the case of each character is mirrored). I've
also tried with and without the trailing backslash. Here is the exact
command I'm using:

Robocopy “C:\Users\class1” “v:\class1\robocopy_backup” /MIR /XA:SH /XD
AppData /XJD /R:5 /W:15 /V /NP /LOG:Backup.log

Does anyone have and suggestions of things I could look at to find the
problem?

Thanks.
 
S

Synapse Syndrome

kapibarra said:
Hello.

I am trying to use robocopy in order to automate my backup. I run the
below command from the command line and in the log file I get the error:

"ERROR 123 (0x0000007B) Accessing Source Directory
C:\Users\class1\"C:\Users\class1"\
The filename, directory name, or volume label syntax is incorrect."

The directory is there, the path is specified in the command exactly as it
shows up in windows (the case of each character is mirrored). I've also
tried with and without the trailing backslash. Here is the exact command
I'm using:

Robocopy C:\Users\class1 v:\class1\robocopy_backup /MIR /XA:SH /XD AppData
/XJD /R:5 /W:15 /V /NP /LOG:Backup.log

Does anyone have and suggestions of things I could look at to find the
problem?

Hi.

There does not seem to be anything wrong with your command, but the error
says that there is a problem with the path, but I cannot see any error.

Why is it seeing

C:\Users\class1

as

C:\Users\class1\"C:\Users\class1"\ ??

I thought this may be due to a junction point, but you are using the /XJD
switch.

Look very closely in the source folder something that somehow is coming up
as:
C:\Users\class1\"C:\Users\class1"\

Have you got any file junction points in the folder? Have you tried using
the /XJ switch instead of /XJD?

ss.
 
K

kapibarra

Synapse said:
Hi.

There does not seem to be anything wrong with your command, but the error
says that there is a problem with the path, but I cannot see any error.

Why is it seeing

C:\Users\class1

as

C:\Users\class1\"C:\Users\class1"\ ??

I thought this may be due to a junction point, but you are using the /XJD
switch.

Look very closely in the source folder something that somehow is coming up
as:
C:\Users\class1\"C:\Users\class1"\

This shows up this way because when I run this command in the command
prompt, I am in the c:\users\class1 directory in the command prompt. I
ran it from the root of c: in the command prompt and this was the error
message in the log:

2008/09/17 10:15:16 ERROR 123 (0x0000007B) Accessing Source Directory
C:\"C:\Users\class1\"\
The filename, directory name, or volume label syntax is incorrect.
Have you got any file junction points in the folder? Have you tried using
the /XJ switch instead of /XJD?

ss.

Hello and thanks for your reply. I tried the /XJ switch instead, but
same result. Then I tried reducing the command line to

Robocopy C:\Users\class1 v:\class1\robocopy_backup /MIR /LOG:Backup.log

and still the same result, so I really don't think it is the command
itself. I checked the directory c:\Users\class1 and I don't see
anything remarkable about it that stands out. I run this command as the
user and the user is an administrator. I checked security on the
directory as well as on the root of the C: drive and I don't see
anything out of place.

Any other suggestions?

Thanks!
 
S

Synapse Syndrome

kapibarra said:
This shows up this way because when I run this command in the command
prompt, I am in the c:\users\class1 directory in the command prompt. I
ran it from the root of c: in the command prompt and this was the error
message in the log:

2008/09/17 10:15:16 ERROR 123 (0x0000007B) Accessing Source Directory
C:\"C:\Users\class1\"\
The filename, directory name, or volume label syntax is incorrect.

This error means that it is looking for a folder at the root of C: actually
called "C:\Users\class1\".

This makes no sense. It is not using the path, but actually looking for a
folder which has the same name as the path. You cannot even have
backslashes or colons in folder or file names.


Hello and thanks for your reply. I tried the /XJ switch instead, but
same result. Then I tried reducing the command line to

Robocopy C:\Users\class1 v:\class1\robocopy_backup /MIR /LOG:Backup.log

and still the same result, so I really don't think it is the command
itself. I checked the directory c:\Users\class1 and I don't see anything
remarkable about it that stands out. I run this command as the user and
the user is an administrator. I checked security on the directory as well
as on the root of the C: drive and I don't see anything out of place.

Very weird. Try this - type in every line, in order:

cd c:\users\class1
cd v:\class1\robocopy_backup
c:
robocopy c:. v:. /MIR /LOG:Backup.log

(Remember that because you have not given the Log destination a full path,
it will only appear correctly in the current directory, even though they are
mirrored)

ss.
 
K

kapibarra

Synapse said:
This error means that it is looking for a folder at the root of C: actually
called "C:\Users\class1\".

This makes no sense. It is not using the path, but actually looking for a
folder which has the same name as the path. You cannot even have
backslashes or colons in folder or file names.




Very weird. Try this - type in every line, in order:

cd c:\users\class1
cd v:\class1\robocopy_backup
c:
robocopy c:. v:. /MIR /LOG:Backup.log

(Remember that because you have not given the Log destination a full path,
it will only appear correctly in the current directory, even though they are
mirrored)

ss.

That seems to have worked because here was the output from the log:


8 c:\Users\class1\
New File 0 Backup.log
100%
100%
New File 1.0 m NTUSER.DAT
2008/09/17 11:40:26 ERROR 32 (0x00000020) Copying File
c:\Users\class1\NTUSER.DAT
The process cannot access the file because it is being used by another
process.

Waiting 30 seconds... Retrying...
New File 1.0 m NTUSER.DAT
2008/09/17 11:40:56 ERROR 32 (0x00000020) Copying File
c:\Users\class1\NTUSER.DAT
The process cannot access the file because it is being used by another
process.

Waiting 30 seconds...

So I tried the entire command I and it worked. I don't know why it
required me to switch directories a few times first, but at least it's
working. Thanks for you help!
 
S

Synapse Syndrome

kapibarra said:
That seems to have worked because here was the output from the log:


8 c:\Users\class1\
New File 0 Backup.log
100%
100%
New File 1.0 m NTUSER.DAT
2008/09/17 11:40:26 ERROR 32 (0x00000020) Copying File
c:\Users\class1\NTUSER.DAT
The process cannot access the file because it is being used by another
process.

Waiting 30 seconds... Retrying...
New File 1.0 m NTUSER.DAT
2008/09/17 11:40:56 ERROR 32 (0x00000020) Copying File
c:\Users\class1\NTUSER.DAT
The process cannot access the file because it is being used by another
process.

Waiting 30 seconds...

So I tried the entire command I and it worked. I don't know why it
required me to switch directories a few times first, but at least it's
working. Thanks for you help!


The first two lines just define the current directories on the two drives,
and the robocopy command uses the current directories (.) instead of the
full path. There is something very weird going on with your computer, which
is making the paths not work properly, so that it is looking for folders
named as the path.

You should make a script to make user profile backups, and exclude the
hidden files like NTUSER.DAT, which is a registry file, and little use to
most people when making backups, seeing as you are not even backing up
AppData, which is potentially more useful.

ss.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top