Windows 7: Robocopy Backup - ERROR 5 (0x00000005)

Hi,
I'm wondering if anyone might be able to shed some light on why I am getting the following such errors when running a robocopy batch file (as administrator) which cause the backup script to stall (- albeit temporarily):

Quote:
2013/07/30 21:10:43 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\Harey 8-128.jpg
Access is denied.

Waiting 30 seconds... Retrying...

2013/07/30 21:12:20 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\TimsData\Year1.pdf
Access is denied.

Waiting 30 seconds... Retrying...

2013/07/30 21:15:27 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\TimsData\Tim\Heddon's Mouth - Printable Walk - South West Coast Path.htm
Access is denied.

Waiting 30 seconds... Retrying...
I am using the following backup command:

Code:
robocopy "%srcPath%\My Documents" "%dstPath%\My Documents" /b /v /ts /fp /bytes /tee /e /dcopy:t /copy:dt /a-:sh /xf desktop.* /np /log+:%logPath%\mwk1log.txt
I realise that if I limit the retries and wait time from the defaults the stall time will be shortened and the file(s) skipped. However, that does not resolve the issue why robocopy is having a problem copying the file(s).

I have found that if the erroring files are moved from the source location to the desktop, the following errors arethen recorded in the log:

Quote:
2013/07/30 21:11:13 ERROR 2 (0x00000002) Copying File C:\Users\Tim\My Documents\Harey 8-128.jpg
The system cannot find the file specified.

2013/07/30 21:13:53 ERROR 2 (0x00000002) Copying File C:\Users\Tim\My Documents\TimsData\Year1.pdf
The system cannot find the file specified.

2013/07/30 21:15:57 ERROR 2 (0x00000002) Copying File C:\Users\Tim\My Documents\TimsData\Tim\Heddon's Mouth - Printable Walk - South West Coast Path.htm
The system cannot find the file specified.
... which is understandable as it has been moved. Then the backup script continues. But when I check the destination directory I find the file has been copied anyway!

Additional Notes:
The target device is an attached external USB drive.
I have already checked that the permissions on the files/folders concerned are correct.
The files affected appear to consistently be .jpg, .pdf or .htm files.
The files do not appear to be corrupt as they can be opened and worked on as required.
The batch file works fine apart from the intermittent errors copying files.

Any advice would be greatly appreciated.


 
My System SpecsSystem Spec  
.

04 Aug 2013   #2
 

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64
 
 
 
 
 

Code:
robocopy "%srcPath%\My Documents" "%dstPath%\My Documents" /b /v /ts /fp /bytes /tee /e /copy:dt /a-:sh /xf desktop.* /np /log+:%logPath%\mwk1log.txt
My System SpecsSystem Spec  
04 Aug 2013   #3
 

Windows 7 Professional 64 bit
 
 
 
 
 

My System SpecsSystem Spec
 
.


07 Aug 2013   #4
 

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64
 
 
 
 
 

My System SpecsSystem Spec
 
07 Aug 2013   #5
 

Windows 7 Professional 64 bit
 
 
 
 
 

My System SpecsSystem Spec
 
10 Aug 2013   #6
 

Windows 7 Professional 64 bit
 
 
 
 
 

My System SpecsSystem Spec
 
15 Aug 2013   #7
 

Windows 7 Professional 64 bit
 
 
 
 
 

My System SpecsSystem Spec
 
16 Aug 2013   #8
 

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64
 
 
 
 
 

Quote:
2013/07/30 21:12:20 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\TimsData\Year1.pdf
Access is denied.
Mmm, I wonder if its the old "Library/junction point" problem.

C:\Users\Tim\My Documents is actually C:\Users\Tim\Documents...............try it yourself : browse to \Users\Tim\My Documents in Windows Explorer....now highlight it in the address bar of Windows Explorer.

Name:  ccc.png
Views: 7
Size:  47.8 KB

Edit the path in robocopy to read C:\Users\Tim\Documents........does the error still occur?


My System SpecsSystem Spec  
19 Aug 2013   #9
 

Windows 7 Professional 64 bit
 
 
 
 
 

My System SpecsSystem Spec
 

19 Aug 2013   #10
 

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64
 
 
 
 
 

Mmm, I'm not sure what else to try. Your errors only happen when you use "My Documents", and all the cases I have seen works when you replace that with just "Documents".

See post #133,#134 and #135 here:
ROBOCOPY - Create Backup Script

The only thing I can think of is to check your script again, or backup all folders directly under /Tim.
posted @ 2015-05-12 13:45  alxe_yu  阅读(949)  评论(0)    收藏  举报