Page 1 of 1

Ignore "The or A's" at start of names

Posted: 21 Dec 2022, 01:19
by GameOverAus
Is there a way to put (A or The's) at the end of names by default. So many movie and shows start with A or The which is a nightmare for sorting.
I would manually name them "Name, The instead of The Name". for instance

Is there a way to do this with the GUI when naming files.? Instead of having to do it manually?

Re: Ignore "The or A's" at start of names

Posted: 21 Dec 2022, 01:45
by rednoah

Re: [SNIPPET] Sort Name

Posted: 21 Dec 2022, 02:49
by GameOverAus
You are awesome, that worked to a tee :)

Code: Select all

{ n.sortName('$2, $1') } 
I then cvame to the issue i wanted to change the :'s FIlebot puts by default which are invalid and only change The to the end. The following works

Code: Select all

{ n.colon(' - ').replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/) } ({y}){' CD'+pi}{subt}