Link to home
Start Free TrialLog in
Avatar of GeorgeAnglin
GeorgeAnglinFlag for United States of America

asked on

Robocopy Error

I am having trouble with a robocopy script (attached).   It has been working but a few days ago I started getting this error:

ERROR 87 (0x00000057) Accessing Destination Directory <Path> The parameter is incorrect.

The files are on a Windows 2008 r2 server and are being copied to NAS.

Are there any Robocopy options that will help?
robo2NAS-.txt
Avatar of Gabriel Clifton
Gabriel Clifton
Flag of United States of America image

First off, I see this problem in the line
if exist N:\Lib16\DriveECopy.txt goto :renameElog

Open in new window

the next line is :renameElog, what if the file does not exist it will still go to :renameElog simply it is the next line, try adding
if not exist N:\Lib16\DriveECopy.txt goto :renameElogerror

Open in new window

and at the end of the script put
:renameElogerror
echo N:\Lib16\DriveECopy.txt does not exist
pause

Open in new window

and see what happens.

Also try changing /XD "e:\System Volume Information E:\$RECYCLE.BIN" to /XD "e:\System Volume Information" "E:\$RECYCLE.BIN"
Avatar of GeorgeAnglin

ASKER

I am not having a problem with that section.   The file renames with no problem.  The issue is once files should be copied I ge the ERROR 87 (0x00000057) Accessing Destination Directory <Path> The parameter is incorrect. error
Try adding Quotes around the source and destination just in case it is having an issue with a space somewhere
I edited my first post, check that also.
Adding quotes as suggested I get this error

Started : Tue Nov 13 15:05:19 2012

   Source - E:\" N:\Lib16\DriveE \MIR \V \NP \FFT \LOG+:N:\Lib16\DriveECopy.txt
\NS \XA:SH \XD e:\System\
     Dest - C:\RoboCmds\2nas\Volume\

    Files :
  Options : /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

ERROR : Invalid Parameter #3 : "Information E:\$RECYCLE.BIN /R:1 /W:1"
That looks a little odd, lets try this. I removed the if exist since you do not use it.
My robocopy script has something similar, I have ran my script for months straight the difference is the ignores
net use n: /d

net use n:  \\bigdatavuhcifs.mis.vanderbilt.edu\vulibrary\Bignas 

rem ##lib16 script, NAS on drive N

for /F "tokens=2" %%A in ('date /t') do set myvar=%%A
set myvar=%myvar:/=%
ren N:\Lib16\DriveECopy.txt DriveECopy%myvar%.txt
cd\

robocopy "E:\" "N:\Lib16\DriveE" /MIR /V /NP /FFT /LOG+:"N:\Lib16\DriveECopy.txt" /NS /XA:SH /XD "System Volume Information" recycler /R:1 /W:1

rem ###Change hidden attribute so dir will show contents

attrib -s -h -r N:\lib16\DriveE

C:

net use n: /d /y
exit

Open in new window

I had to remove the quotes from around the source and destination paths.  I have attached the log.    I still get the error when it attempts to copy a new file.
DriveECopy.txt
ok, try robocopy "E:"

I tried a test on root drive and with the \ I kept having errors.
Avatar of arnold
The third element in your example should be *.* to define the file types.
The removal of \ as suggested by panthertech may do the same.
Removing the \ or adding *.* do not eliminate the errors
Has anything changed on the destination, quota limit or permissions
No,  I have other servers backing up to the NAS with no problems
I think I have found the source of the error.   The files are compressed using the "Compress contents to save disk space" option in Advanced Attributes.

Is there a Robocopy switch that will allow it to copy the files without removing compression?
ASKER CERTIFIED SOLUTION
Avatar of Gabriel Clifton
Gabriel Clifton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial