Page 1 of 1
Sorting with minor deletions or additions of text
Posted: May 19th, 2025, 9:15 am
by MavSAB
Is it possible to move downloaded files to specific folders as follows?
eg. The ABC Show S01E01Title of Ep 1080p WEB .nzb
would download and sort to folder:
Downloads \ ABC Show \ ABC Show Season 1 \ filename (of extracted file)
ie. deleting "The" from first sub-folder and repeating "ABC Show" in the name of the Season sub-folder.
What would be the sort string? How to make it work only on files containing the words "ABC Show"?
Thanks
Re: Sorting with minor deletions or additions of text
Posted: May 20th, 2025, 9:00 pm
by Damioings
To remove the word "The", you can use regex instead:
^(The\s)?(.*) → keep only the part after "The".
Depending on the tool you use, the syntax will be different, but the idea is the same.
Re: Sorting with minor deletions or additions of text
Posted: May 23rd, 2025, 8:39 am
by MavSAB
If you can please expand on your method with a sort string.
eg. using the example above, a sort string of %sn/Series %s produces:
The ABC Show \ Series 1 \ filename (of extracted file)
Can you please provide a sort string that will produce:
ABC Show \ ABC Show Season 1 \ filename (of extracted file)
Re: Sorting with minor deletions or additions of text
Posted: May 24th, 2025, 8:01 am
by jcfp
I don't think sabnzbd's sorting allows for modifying variables via regular expressions or similar. The sorting does however primarily source its info from the job name, that in turn can be modified from a
pre-queue script (where you do have access to all kinds of scripting and regexp powers).
Alternatively, you could use one of many third party apps to handle the sorting and library management for you; they typically are more powerful in this area because they actually know what the content of a particular job is supposed to be (unlike sabnzbd that can only do a best guess based on jobname and some metadata).
Re: Sorting with minor deletions or additions of text
Posted: May 25th, 2025, 4:00 am
by MavSAB
Thanks but not looking for 3rd party downloading, sorting or library management apps or scripts. Nor do I know of one that does just what I'm asking without taking over the whole process. The inbuilt sorter has the job nearly done.
Just thought there'd be a simple way for the miniscule change sought, ie. deletion of a word in a title.
Re: Sorting with minor deletions or additions of text
Posted: May 26th, 2025, 1:05 am
by safihre
The Sorter can do the easy stuff only, to prevent having to support complex things which other apps are much better at.
For your use case the pre queue script sounds like a very simple solution. Could even ask some AI to write it for you. Just tell it to follow our documentation page.
Re: Sorting with minor deletions or additions of text
Posted: May 26th, 2025, 6:46 am
by MavSAB
Ok but the sorting part is mostly fine, it's the naming part, ie. removing a word from the existing name, that's the main request. How can that be done or what script achieves that?