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:

 

image.thumb.png.5abc537f32284c6e4e4a550d0a591e62.png

 

 

The files definitely exist on the server though:

image.thumb.png.df5afeca35ef12148be012d5a4ae3011.png

 

image.thumb.png.214e049b5eb427d106558c6781811937.png

 

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
    image.png.92a596658f21972a70ad014d0d128a9d.png
    image.thumb.png.7a207c2d0d5fe6bdf298ae75611d2546.png
     
  • However, entering the path manually in explorer does then display the contents of the folder
    image.png.dd874ab88bc44a0f1b1ed3479399f49f.png
     
  • 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
    image.png.68167934cb09feef92fb5f619e78eb83.png
     
  • To test this the other way, I created a "Test" folder within finder on the mac, and that was immediately visible on both machines:
    image.thumb.png.945b0147a04440c971a8af77a592eba9.png
    image.png.e9a78c598ade968a74ebd85d4ab31233.png
     
  • So then I created another, empty folder on the Windows machine, closed explorer and reopened it and it was visible on both machines
    image.png.4301f2388c02e4aa5c4f7db7827a58ec.png
    image.thumb.png.d3354f21e8503a3d3813c6c6b4ea9822.png
     
  • 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)
    image.png.bbb5578f0b5d0da76c393260b665eb5f.png
     
  • Sure enough the next time I reloaded file explorer it was gone
    image.png.bbcad044c9684ffaa715cc0762b73997.png

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

nebula-diagnostics-20230106-0710.zip

 

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.

 

image.png

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.

Guest
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.