Page 1 of 1

Sort into A-Z folders trouble.

Posted: 15 May 2016, 14:05
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?

Re: Sort into A-Z folders trouble.

Posted: 15 May 2016, 14:59
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}

Re: Sort into A-Z folders trouble.

Posted: 15 May 2016, 15:21
by nzdreamer55
As always just the right amount of help :-)

Thank you very much. That worked.