Jump to content

Automatically delete or hide folders

6 posts in this topic Last Reply

Recommended Posts

Posted (edited)

Hello everyone.  It's clear in looking over these forums that those of you active here know WAY more than I do so I'm looking to borrow some of your ingenuity.  Perhaps this has already been done but I'm having trouble locating it. I'd like to figure out a way with Unraid so that when I delete an episode or movie, the folder containing it is automatically deleted.  The best bet is some kind of script or plugin that would automatically (on a schedule probably) scan for and delete folders smaller than a set size. 


Even better would be a way to instead of deleting the folders....hide them from Windows.


Any ideas?


Thanks in advance for your help!

Edited by bsavage13

Share this post

Link to post

Awesome thank you!  Is there something similar to easily hide and unhide folders instead of removing them by chance?


Thanks again for your help!

Share this post

Link to post

You could set the permissions so the directory is unreadable and unwritable:

chmod 111 '/mnt/user/test/Movies/movie name'

or you could rename it to a dot file:

mv '/mnt/user/test/Movies/movie name' '/mnt/user/test/Movies/.movie name'

or you could move the folder to another folder

mv -f '/mnt/user/test/Movies/movie name' '/mnt/user/test/Hidden/movie name'

Other than that, I'm not sure how you could hide it.

Share this post

Link to post

Hi I used the script linked above to remove all empty folders or folders with nothing in except for leftover stuff like nfo thumbnails etc. hence the 10mb size.


The problem with hiding them is that you will need to unhide them when they have something in :)



Share this post

Link to post

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.