Unpack single files without creating a folder?

Want something added? Ask for it here.
Post Reply
User avatar
OneCD
Hero Member
Hero Member
Posts: 609
Joined: March 4th, 2017, 3:47 pm

Unpack single files without creating a folder?

Post 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. 🤓
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
sander
Release Testers
Release Testers
Posts: 9221
Joined: January 22nd, 2008, 2:22 pm

Re: Unpack single files without creating a folder?

Post by sander »

so ... not with a post-processing script?
User avatar
OneCD
Hero Member
Hero Member
Posts: 609
Joined: March 4th, 2017, 3:47 pm

Re: Unpack single files without creating a folder?

Post by OneCD »

Yes, could-do, but really wanted to confirm this is something that can’t already be done with the existing code. 👍
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
sander
Release Testers
Release Testers
Posts: 9221
Joined: January 22nd, 2008, 2:22 pm

Re: Unpack single files without creating a folder?

Post 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.
User avatar
OneCD
Hero Member
Hero Member
Posts: 609
Joined: March 4th, 2017, 3:47 pm

Re: Unpack single files without creating a folder?

Post by OneCD »

Ah, then it’s probably not already there.

Thanks @sander. 👍
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
OneCD
Hero Member
Hero Member
Posts: 609
Joined: March 4th, 2017, 3:47 pm

Re: Unpack single files without creating a folder?

Post 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. :)
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
safihre
Administrator
Administrator
Posts: 5567
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Unpack single files without creating a folder?

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 609
Joined: March 4th, 2017, 3:47 pm

Re: Unpack single files without creating a folder?

Post by OneCD »

Ah, no worries. Thanks @safihre. :)
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Post Reply