• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4168
  • Last Modified:

Robocopy Error - Access Denied

Last week I wrote a simple Robocopy script and saved it as Robo3.cmd on my Windows 2003 Ent server. The script is intended to copy the Backup Exec Exchange and bkf files to an attached 2TB USB for off site backup. It worked perfect for three days running as a scheduled Windows task using the domain administrator login and pw for credentials.

Yesterday, I decided to make a master copy of the backup files and replaced the USB drive with a fresh duplicate drive formated as NTFS like the others. After 5 hours of copying files,  it copied the recycle bin and tried copying the System Volume Information which started a continious loop of errors every 30 seconds. How do I stop the recycle bin and System Volume Information from being copied?

Here is that portion of the log file.

        New Dir          0      f:\RECYCLER\
        New Dir          4      f:\RECYCLER\S-1-5-21-1278163717-1751908949-1237765062-500\
          New File                    65      desktop.ini
          New File                 1.3 g      Df5.bkf
          New File                 1.3 g      Df6.bkf
          New File                  4820      INFO2
                         1      f:\System Volume Information\  
2011/04/28 16:30:41 ERROR 5 (0x00000005) Copying File f:\System Volume Information\MountPointManagerRemoteDatabase
Access is denied.

Waiting 30 seconds... Retrying...
Tony Giangreco
Tony Giangreco
  • 2
1 Solution
/XD "F:\Recycler" "F:\System Volume Information"
to your command line.
In addition, you can set /r (retry) and /w (wait between retries) both to 0, since this is a local copy and unlikely to have recoverable errors:
/r:0 /w:0
Tony GiangrecoAuthor Commented:
Ok, that worked, but the external USB drive ran out of space before the process could complete. How do i tell Robocopy to stop if it runs out of space?

Here is my script

### Capture date info
echo %date:~-4,4%
echo %date:~-7,2%
echo %date:~-10,2%
set yr=%date:~-4,4%
set mo=%date:~-7,2%
set dy=date:~-10,2%
set f2=%date:~-10,2%-%date:~-7,2%-%date:~-4,4%
robocopy.exe f:\ x:\ *.* /E /SEC /NP /COPYALL /XD "F:\Recycler" "F:\System Volume Information" /Log:%fn%
copy %fn% Robo-Today.txt
There's no provision for that. Either leave it running until it has come by the last source file, or kill the process (Ctrl-C in the command prompt).

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now