Sort into A-Z folders trouble.

All about user-defined episode / movie / file name format expressions
Post Reply
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Sort into A-Z folders trouble.

Post by nzdreamer55 »

So I wanted to use the snippet of code that rednoah put up here viewtopic.php?f=5&t=910 to sort stuff into folders. Below is what I have. I use the CLI to run this.

Code: Select all

filebot -script fn:amc "/home/linux/mnt/Film.Pool/Test/" --def "movieFormat=/home/linux/mnt/Film.Pool/{n =~ /^(?i)[a-z]/ ? n[0] : '#'}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /\$2, \$1/)} ({y}){' '+[vf]}/{n.upperInitial().replaceFirst(/^(?i)(The|A|An)\s(.+)/, /\$2, \$1/)}} {' '+[vf]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}{'.'+[group]}..."
So the leading words (The,A,An) all get moved to the end with a comma, but for some reason Filebot still sorts them into the folders starting with the original title.

For example

The Dead Pool => Dead Pool, The => filed under the "T" folder instead of the "D" folder.

Is there a way to get Filebot to use the changed name instead of the original name to sort?
User avatar
rednoah
The Source
Posts: 23935
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort into A-Z folders trouble.

Post by rednoah »

Use the new {az} binding. That should take care of what most people want when they say "A-Z folder" including special cases like numbers, using collection name over movie name, etc

Code: Select all

{az}
:idea: Please read the FAQ and How to Request Help.
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Re: Sort into A-Z folders trouble.

Post by nzdreamer55 »

As always just the right amount of help :-)

Thank you very much. That worked.
Post Reply