I have a backup batch file that uses Robocopy to backup my files (note this example contains newlines that you should remove):

robocopy "C:\" "G:\Default\RoboCopyBackup\C" /XF Pagefile.sys /XD 
"System Volume Information" "Recycler" "Temporary Internet Files"
"Installer Cache" "Temp" /E /R:1 /W:0 /TEE /XJ

This should create a folder structure on the external backup drive like so:


However, G: appears totally empty.

What is weird, is that the folders and files are there! If I type the above path into the address bar, I see all the files and folders!

Can anyone help me understand why? I think it might be some NTFS-based ownership/permissions thing but I'm not sure.

  • what does attrib * show if run at the root of g:
    – tony roth
    Jun 28, 2010 at 20:42

4 Answers 4


I've never gotten a satisfactory answer to this problem, but it seems to be a combination of copying the root of a drive (in your case C:\) and the /COPYALL flag.

RoboCopy seems to apply System and Hidden attributes to the target folder when copying an entire source drive. So far I've found two work arounds...

1) run ATTRIB after your run robocopy. In your case :

attrib -s -h "G:\Default\RoboCopyBackup\C"

2) change /COPYALL to /COPY:DTSOU (excluding the A for copy attributes). In your case I don't see a copyall flag listed, but I've seen it quite frequently in posts about this problem. Removing the attributes may not be a practical solution in your case, so your mileage may vary on this one.

HTH, -eric


Robocopy will create a folder path for you based on the attributes of the source folder you are copying. Copying an entire drive will cause the folder to be hidden and marked as a 'system folder'.

You can make the folder visible by unchecking "Hide protected operating system files (Recommended)" on the view tab of the Window Explorer's folder options window.


I had this happen this past weekend, I determined it to be due to robocopy failing to copy everything, in my instance it failed because some genius had the server performing automatic updates in the middle of my scheduled maintenance window. after I restarted robocopy and let it finish the directory showed up just fine.


Thinking about it some more, I had a similar problem crop up when attempting to copy the folder structure off the root of a drive and it failed when copying the system volume information.


I'm using Windows 7 and defining this parameter resolved this problem for me :)


  • 2
    You should at least explain what these parameters are supposed to do and how they help to solve the problem.
    – Sven
    May 31, 2016 at 17:04
  • I don't get it (either) ... May 31, 2016 at 19:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .