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:
G:\Default\RoboCopyBackup\C\...
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.
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 :2) change
/COPYALL
to/COPY:DTSOU
(excluding theA
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.
EDIT:
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 :)
/COPY:DTO