Page 1 of 1
Putting The, at the end of a file name with The at the beginning of the title?
Posted: 20 Jul 2016, 02:11
by boe
I think it can already do this but I don't know how. Can someone tell me how to move the location of "The" from the beginning of a file name?
For example if I have:
The Rock (1996).mkv
The Rundown (2003).mkv
I would like the file names to be:
Rock, The (1996).mkv
Rundown, The (2003).mkv
Thanks
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 20 Jul 2016, 03:33
by rednoah
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 20 Jul 2016, 03:49
by boe
Fantastic! Thanks!
Code: Select all
{n.sortName('$2, $1')} ({y}){subt}
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 25 Sep 2016, 20:29
by boe
Sorry - I thought I got it but I would like to do the same for TV shows. Currently I'm using
{ny}/Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf} but I want the TV show top folder to have THE in the title at the end. E.g. Exorcist, The (2016)
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 26 Sep 2016, 02:45
by rednoah
You can use this snippet in your episode format as well:
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 26 Sep 2016, 02:58
by boe
Thanks - sorry I don't understand. Can you give me the full line based on - {ny}/Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf} - I have no idea where that code goes in for {n.sortName('$2, $1')} ({y})
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 26 Sep 2016, 05:10
by rednoah
This is the default name/year binding:
This is your special name/year expression:
Use the GUI Format Editor to play with it. It'll take you seconds to figure it out by yourself via trial and error even if you have no idea what you're doing.

Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 26 Sep 2016, 13:31
by boe
For anyone interested - I tried
{n.sortName('$2, $1')}/Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf} - that doesn't work
I tried {n.sortName('$2, $1')} ({y})/Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf} - that works.
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 27 May 2017, 03:58
by boe
Hello,
I recently reformatted my computer and messed up something on my TV show formula. I use filebot to fix the details, rename the file and move it to the correct folder.
I tried this G:/TVCurrent/{n.replaceTrailingBrackets().sortName('$2, $1')} ({y}) /Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf}
And I got an xml error
http://imgur.com/a/KzCxu
I notice the code works with the TVMaze data source but no longer with theTVDB which I had been using in the past. Unfortunately for whatever reason the naming is slightly off if I use TVMaze. Strangely it also works on some series such as If I choose The flash with no date or The Flash (1967) just not the 2014 series
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 28 May 2017, 03:55
by ZeroByDivide
That's because TVDB's xml is messed up for a lot of shows, has been going on like this for at least a week now.
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 28 May 2017, 03:58
by boe
Good to know - I thought it was because of some typo in my code when I reformatted my computer.
Re: Putting The, at the end of a file name with The at the beginning of the title?
Posted: 30 Apr 2024, 21:43
by rednoah