Why does RoboCopy create a hidden system folder?

Solution 1:

On my system (Vista), powershell shows the c:\ drive as having both hidden and system attributes set.

    PS C:\Users\michael.DOMAIN> Get-Item c:\


    Directory:


Mode           LastWriteTime       Length Name
----           -------------       ------ ----
d--hs     8/18/2009 12:19 PM        <DIR> C:\

After copying the files, you can use attrib to fix them. Check out attrib /? for details.

Solution 2:

It has to do with copying the hidden/system System Volume Information from the root of a disk - if it gets copied, the target directory gets the same attributes system/hidden.

Creating the directory before copying does not help as robocopy will hide it too.

Add the /A-:SH switch to ignore system files.

More information in this Microsoft Technet discussion.