ROBOCOPY hides destination Directory
I have used ROBOCOPY to tranfer a large file from or to a USB drive and the destination Directory on both occassions has beeen chnaged to a hidden system directoiry, which could not be seen in Windows explorer or through command line access, even with the "Show hidden and System files" set on in the view properties window. The command executed was ROBOCOPY {source drive} {destination drive\folder} /MIR The command echoed all the actions performed during the copy and displayed a successful copy command summary at the end. To enable windows to see the directory I had to either type the directory in the explorer address bar, or use the command prompt to change the attribute of the directory as follows "attrib -h -s d:\Films", whereupon the directory was visible in windows explorer. Can anyone suggest a way out if this wwithout the need to execute the attribb -h -s command after every ROBOCOPY command?
August 12th, 2010 1:55pm

Hi, Thanks for posting in Microsoft TechNet forums. I just performed a test using above command without any problem. I am assuming it is due to the USB drive itself, it may be infected by viruses or malware. Regarding this, I would like to provide the following suggestions: 1. Use ROBOCOPY to copy files to the built-in hard drive to see if the issue occurs. 2. Manually copy the files to the external USB drive to see if they are hidden. 3. Update the security software and perform a full scan. 4. Format the USB drive to remove suspicious files completely and perform ROBOCOPY again. Best Regards Dale Qiao TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.comPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2010 5:42am

Hi, As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish. BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts. Best Regards Dale Qiao TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.comPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
August 18th, 2010 4:28am

Hello, I am seeing this phenomenon also on Windows Server 2008 R2 X64 Here is the command i am running: robocopy \\10.85.58.130\d$ \\MRDC01\APPS_Backup\XV /S /E /FP /XD temp RECYCLER sereno "System Volume Information" /XF pagefile.sys The destination folder XV is having the attributes set ad Archive, Hidden, System May it be because the source is an administrative share? Thanks, Norbert
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2010 6:02pm

Hi there, I too am seeing this behavior, where the source file is normal, but Robocopy changes it to "system" "hidden" on the target drive. I am copying several folders from my C: drive to my E: drive. They are both internal hard drives. All of the folders copy normally, excepting one, the "My Documents" folder. It is the one that gets its attributes changed. All the commands in my batch file are identical. Here is the command that copies the "My Documents" folder, that is for some mysterious non-obvious reason changing the attributes. By the way, the destination folder (E:\Shuksan\My Documents) already exists each time. I am just "updating" it with changed files. robocopy "C:\Users\Roger\My Documents" "E:\Shuksan\My Documents" /NP /S /E /V /XO /XJ /LOG:"C:\Users\Roger\Scripts\E_Shuksan.log" /R:0 /W:5 The "E:\Shuksan\My Documents" folder gets changed to "system" "hidden" every time. I change it back with the "attrib" command, but why is this happening? It doesn't seem right! By the way, I'm running Windows 7, 32 bit edition , which has "robocopy" built in. I have two hard drives, C and E (why "E" instead of "D" I don't know), the C: drive is 300GB and the E drive, mostly empty, is 1 terabyte. **** UPDATE NOTE****** I just found a solution, though I hate it. I added the switch /A:-SH to the command, and now the directories copy and are not converted to "System" "Hidden". The new command looks like this: robocopy "C:\Users\Roger\My Documents" "E:\Shuksan\My Documents" /NP /S /E /V /XO /XJ /A:-SH /LOG:"C:\Users\Roger\Scripts\E_Shuksan.log" /R:0 /W:5 Thanks Roger Matthews
October 30th, 2010 9:35am

I'm also seeing the same thing, however, I have something else to add. I have several robocopy commands which I execute from a scheduled .bat file. I'm copying several directories, such as "C:\Data", "C:\Distributions" as well as "C:\Users\mark.FIRSTMOUNTAIN.000\My Documents". The first two correctly copy without being hidden or system at the destination. Only the My Documents directory behaves as described above. I also have another wrinkle which I observed. Originally, I was copying C:\Users (in other words, I wanted to back up all the user directories). I found that robocopy got into some kind of endless loop, where it kept copying the same directories with ever lengthening directory names. It seemed to keep concatenating ApplicationData as in ApplicationData\ApplicationData\ApplicationData...etc. I think it had to do with "All Users" which must be a pointer to the other sub-directories. I agree with Roger that the /A:-SH solution is not pretty. What if there are legitimate S or H files in the directory you're copying? It should copy the attributes of the files without changing them. Thanks, Mark Hartigan
Free Windows Admin Tool Kit Click here and download it now
December 8th, 2010 10:53pm

I had all the same frustration, I just can't get used to all the "Features" of Windows 7. I tried using all the back-up utilities and they are worthless, I like all my files on a external drive so I can get them from any pc any operating system, and I always relied on robocopy scripts, they work great. But I still can't get it to work with the my pictures my music directories, I tried the A:-SH and it doesn't recognize it. What a royal pain in the neck.
December 30th, 2010 5:52am

I've had this problem forever on Win7 (64 bit). It's been two years now. Why hasn't Microsoft fixed this yet?
Free Windows Admin Tool Kit Click here and download it now
March 17th, 2012 12:26pm

Same Problem when copying from the root of the drive (ie d:) to a subdirectory on another drive (ie z:\backup_d) Have to use attrib -s -a -h d:\backup_d to unhide the folder. Tried many robocopy options without success Any clue ? Thanks Patrick
March 17th, 2012 1:18pm

Try Attribute /A-:SH instead of A:-SH That worked for me. robocopy \\S09\S09_D\ "C:\Dropbox\S09_D" /mir /R:0 /W:0 /FFT /A-:SH The /FFT option with 2-second date/time granularity is useful when copying to devices with other file system than NTFS (QNAP) See also http://ss64.com/nt/robocopy.html Best regards Sigurd
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2012 10:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics