I thought I would try out RoboCopy for mirroring the contents of a folder to another harddrive. And seems like it worked. But, for some reason, to see the destination folder I have to both enable Show hidden files, folders and drives and disable Hide protected operating system files. Why is this? Both the source and destination folder was initially both visible and normal directories. When I open up the properties for that destination folder, the Hidden attribute is even disabled. What is going on here?

Is it because I ran it in an administrator command prompt? Or is it an issue with my choice of modifiers? Or does robocopy really just work this way?

robocopy E: I:\E /COPYALL /E /R:0 /MIR /B /ETA


Update: Tried to copy another drive to another folder, and I got the same thing happening there. But when I try to just copy a folder to a different folder, then the destination folder stays normal. Could it be because I copy a drive? If so, how can I prevent this from happening? Cause I really do want to copy the whole drive...

link|improve this question

74% accept rate
feedback

2 Answers

up vote 1 down vote accepted

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.

link|improve this answer
Hm, yeah, all my three hard drives have those attributes as well... Weird thing is that my D and E drives got a hidden system folder when I robocopied them to folders on an external drive, while the C drive didn't O.o I don't get this... – Svish Aug 18 '09 at 18:02
I'm having the same problem with a hidden network share ($). I ran Get-Item on that share and it also says d--hs so I guess that's the reason! Thanks! – Chris Haas Jan 4 at 15:58
feedback

Use M Aguilar's solution if you don't mind running attrib afterwards. Another solution would be to just create the target directory beforehand:

  1. mkdir I:\E
  2. robocopy E: I:\E /COPYALL /E /R:0 /MIR /B /ETA
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.