ERROR 5 (0x00000005) Accessing Destination Directory
System Error code 5 = ERROR_ACCESS_DENIED; it's a permission problem.
I was not aware I had a $RECYCLE.BIN in my file tree
Every drive has a hidden recycle bin folder.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
Thank you for looking.
I run this .bat file to give me a copy of external drive E:\ (source) to external drive D:\ (dest):
robocopy E:\ D:\ /e /w:5 /r:2 /COPY:DATSOU /DCOPY:DAT /MT
All has been well, until now when this message:
ERROR 5 (0x00000005) Accessing Destination Directory D:\$RECYCLE.BIN\
I was not aware I had a $RECYCLE.BIN in my file tree, and a search on Windows Explorer has drawn a blank.
A CHKDISK test is all clear.
I can access all folders on both drives normally.
Please can someone help with a fix?
I want to avoid changing the .bat string, as this has worked well in the past.
Many thanks
PS Please keep answers sinple for I am in the dummy bracket!
ERROR 5 (0x00000005) Accessing Destination Directory
System Error code 5 = ERROR_ACCESS_DENIED; it's a permission problem.
I was not aware I had a $RECYCLE.BIN in my file tree
Every drive has a hidden recycle bin folder.
Just tell robocopy to exclude that directory. You may also have a problem with "System Volume Information".
Add this to your robocopy command so that it only copies your user folders.
/XD $Recycle.Bin "System Volume Information"
Open a command prompt with run as administrator and run this command to see all files and folders .
dir /a E:\
Many thanks for your reply.
Before I saw your suggestion, I ended up wiping the drive (during which a warning about a corrupted recycle folder popped up), formatting, and running my .bat file again.
This has me back to where I was before the issue arose, but, I would be very interested to know if you would still advise altering the robycopy command so it only copies user folders?
Would the new command look like this?
robocopy E:\ D:\ /e /w:5 /r:2 /COPY:DATSOU /DCOPY:DAT /MT/XD $Recycle.Bin "System Volume Information"
Thanks again.