Jump to content

Directory Created by Robocopy is Not Visible in Windows Explorer

Go to solution Solved by gooner_47,

Recommended Posts

Ran a robocopy command on a windows laptop to copy some files and directories to the Unraid server:


robocopy /E /R:5 "D:" "\\NEBULA\Backups\FiLaptop\04-01-2023" /XF ._Thumbs.db /XD "D:\$RECYCLE.BIN"


This completed successfully, but I cannot see this folder in either Windows explorer (from the same laptop that the robocopy command was run), or Mac finder:





The files definitely exist on the server though:





What could be causing this, is it a permissions thing?


Edited to add - the reason for running this robocopy command is because the D drive on the Windows laptop out of the blue has become unable to create folders on it. The existing files are all still visible and you can open them, but you just can't edit or create anything new.


Windows Error checking on that drive states "Repair this drive" so there is clearly something amiss which I am yet to investigate. First priority  was just to get the files backed up in case the drives dies. I wonder if this is related somehow to not being able to see the folders in finder or windows explorer.

Edited by gooner_47
Link to comment

So as a new server won't be on the cards for a while, I stopped all the docker containers, turned off autostart and rebooted in the hope this would help with any memory issues for the purposes of the diagnostics.


I've managed to recreate the issue:

  • Manually create an "06-01-2023" folder on the server, from within windows file explorer (in case the problem was folders created by Robocopy itself)
  • Start robocopy running with 
    robocopy /E /R:5 /W:2 "D:" "\\NEBULA\Backups\FiLaptop\06-01-2023" /XF ._Thumbs.db /XD "D:\$RECYCLE.BIN"
  • Click in the command prompt to pause robocopy after a few minutes
  • Open file explorer and finder, in both the "06-01-2023" folder is not visible
  • However, entering the path manually in explorer does then display the contents of the folder
  • Out of curiosity I then tried manually typing out the folder name "04-01-2023" from the original post where I first saw the behaviour and all of the contents were then displayed
  • To test this the other way, I created a "Test" folder within finder on the mac, and that was immediately visible on both machines:
  • So then I created another, empty folder on the Windows machine, closed explorer and reopened it and it was visible on both machines
  • So then I started wondering if it was robocopy copying files into that directory that was "hiding" it
  • Ran the following 
    robocopy /E /R:5 /W:2 "D:" "\\NEBULA\Backups\Test created by the windows machine" /XF ._Thumbs.db /XD "D:\$RECYCLE.BIN"
  • The icon for the directory then changed to indicate it was a hidden item (paler)
  • Sure enough the next time I reloaded file explorer it was gone

SO after all that debugging, it looks like the problem is that the result of running robocopy on a directory on the server, is to hide it from view on both windows and mac.


Diagnostics here



At this point I'm not sure if this a robocopy "feature", or an Unraid issue. What do you think, is this something that warrants further investigation? I will do some more searching to see if others have encountered the same behaviour with robocopy - unraid or not.



Link to comment
  • Solution

This is a Robocopy issue. Ran the following command and all was fine, the destination folder didn't "disappear". Key part is the "/A-:SH" flag at the end.


robocopy /E /R:5 /W:2 "D:" "\\NEBULA\Backups\FiLaptop\New 06-01-2023" /XF ._Thumbs.db /XD "D:\$RECYCLE.BIN" /A-:SH


Stackoverflow post


Blog post with the solution to "unhide" the folder again, and the flag to add to robocopy command to prevent this happening in the first place

  • Like 1
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...