Page 1 of 1

Unpack single files without creating a folder?

Posted: March 15th, 2025, 10:18 pm
by OneCD
Hi guys,

Using SABnzbd 4.4.0 from source on Debian 12.10.

For categories where no external post-processing takes place, my downloads are each placed into separate folders. This is very neat.

However, many times, the folder will only contain a single file (after SABnzbd processing to remove unwanted file types, sample, etc...) and I'd like to avoid folder creation when this happens. Creating a single folder that will contain multiple files makes sense, but not-so-much when that folder will only have a single file in it.

This might mean reactively moving the single remaining file out of that folder and up-to the parent folder, then deleting the now empty folder. Which is what I've been doing by-hand for many years.

Is there a way to select this behaviour with a switch or setting?

Thoughts please? Thank you. ๐Ÿค“

Re: Unpack single files without creating a folder?

Posted: March 16th, 2025, 2:48 am
by sander
so ... not with a post-processing script?

Re: Unpack single files without creating a folder?

Posted: March 16th, 2025, 2:51 am
by OneCD
Yes, could-do, but really wanted to confirm this is something that canโ€™t already be done with the existing code. ๐Ÿ‘

Re: Unpack single files without creating a folder?

Posted: March 16th, 2025, 2:55 am
by sander
OneCD wrote: โ†‘March 16th, 2025, 2:51 am Yes, could-do, but really wanted to confirm this is something that canโ€™t already be done with the existing code. ๐Ÿ‘
Good point! It might be in the magic of RSS or other SAB parts, but that I don't know.

Re: Unpack single files without creating a folder?

Posted: March 16th, 2025, 3:07 am
by OneCD
Ah, then itโ€™s probably not already there.

Thanks @sander. ๐Ÿ‘

Re: Unpack single files without creating a folder?

Posted: March 19th, 2025, 2:39 am
by OneCD
Just been experimenting with not creating job folders via the SABnzbd configuration. My intention is to make a "dump" location that will accumulate many files over time.

My target category path looks like /target/path/*

My category post-processing is set to: +Delete.

Just noticed this erases existing files in the target path that fit the unwanted filetypes list, including existing sub-directories for some reason. When I check the SABnzbd log, it mentions the files it deletes, but doesn't appear to log the directories deleted. Is this a bug? Is it supposed to remove directories that existed prior to SABnzbd post-processing?

edit: uh-oh, it's also renaming existing files incorrectly too.

Thank you. :)

Re: Unpack single files without creating a folder?

Posted: March 19th, 2025, 7:38 am
by safihre
Yes this doesn't work if you have Renaming and Unwanted Files enabled.
But it should always log directory deletions in Debug mode.

Re: Unpack single files without creating a folder?

Posted: March 20th, 2025, 2:15 am
by OneCD
Ah, no worries. Thanks @safihre. :)

Re: Unpack single files without creating a folder?

Posted: May 15th, 2025, 11:18 am
by Stryker_One
Is there a way to do this in Windows?