auto-delete empty source folders

Support for macOS users
Post Reply
yhm28
Posts: 27
Joined: 24 Jan 2018, 07:20

auto-delete empty source folders

Post by yhm28 »

I'm using NFS shares, and after Filebot is complete, the are empty folders left. How do I specify auto-deletion of the empty source folders on completion?
User avatar
rednoah
The Source
Posts: 24111
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: auto-delete empty source folders

Post by rednoah »

:?: Are you using the GUI or the CLI? (NOTE: The GUI will auto-delete left-behind empty folders by default. The CLI has the --apply prune option.)


:?: Are the folders empty? Are the folders really empty from the server point-of-view which may prevent FileBot from deleting a folder even if the delete commands are sent. What does the log say?
:idea: Please read the FAQ and How to Request Help.
grapii
Posts: 3
Joined: 20 Aug 2025, 08:49

Re: auto-delete empty source folders

Post by grapii »

Hi, is there a way to disable the auto-delete of empty folders using the GUI?? I actually don't want this feature active.
Thanks
User avatar
rednoah
The Source
Posts: 24111
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: auto-delete empty source folders

Post by rednoah »

grapii wrote: 20 Aug 2025, 08:51 Hi, is there a way to disable the auto-delete of empty folders using the GUI??
:idea: Technically, no. But you could just create a hidden file, making the folder not empty, disabling the auto-delete of empty folders feature. A Custom Post-Processing Script could do this automatically after files are named / moved. If you're processing files within the same file system, then you could also just hardlink files?


:?: What is your reasoning? What is your use case? What is the name of the folder you want to not auto-delete? Presumably it's not something like an empty folder named Stargate SG1/Season 1 and instead maybe something like a Downloads folder?
:idea: Please read the FAQ and How to Request Help.
grapii
Posts: 3
Joined: 20 Aug 2025, 08:49

Re: auto-delete empty source folders

Post by grapii »

I have this workflow folder structure, 1. PLEX CLEANED, 2. PLEX RENAMED. 1. PLEX CLEANED contains files (movies/tv shows), flat, not in subfolders, that have ran through MKVtoolNix to remove unwanted tracks, I then run FileBot over those files which renames them and moves them to 2. PLEX RENAMED into relevant subfolders (Movies / TV Shows), which is great, however this leaves 1. PLEX CLEANED empty, which FileBot deletes. I then have to recreate it to place new files that need cleaning, I would prefer to keep this top level folder intact and not get deleted each FileBot run.
User avatar
rednoah
The Source
Posts: 24111
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: auto-delete empty source folders

Post by rednoah »

I see. So your request is rather "do auto-delete folders like Stargate SG1 or Season 1 but do not auto-delete folders like PLEX CLEANED or PLEX RENAMED".


:arrow: The thing that you can do about that is to simply add an extra file to your PLEX CLEANED / PLEX RENAMED folders. A 0-byte hidden file will do the trick.


:arrow: The thing that I can do is add PLEX CLEANED and PLEX RENAMED to the list. FileBot doesn't delete well-known folder names like Downloads, complete, etc.
:idea: Please read the FAQ and How to Request Help.
grapii
Posts: 3
Joined: 20 Aug 2025, 08:49

Re: auto-delete empty source folders

Post by grapii »

That would be great, just to confirm though the folders start with a number, so it’s:

1. PLEX CLEANED
2. PLEX RENAMED

Thanks
User avatar
rednoah
The Source
Posts: 24111
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: auto-delete empty source folders

Post by rednoah »

I see. I could not have guessed that. Make sure to include these kinds of details in the future, here or elsewhere. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply