Board index Episode / Movie Naming Scheme How about sharing our format expressions?

How about sharing our format expressions?

All about user-defined episode / movie naming schemes

rednoah User avatar
The Source

Posts: 4499
Location: Taipei

:idea: If you spent time on writing a naming scheme that fits exactly what you want, why don't you share it here?

:arrow: Help create a collection of all kinda naming schemes so new users can just copy & paste what other have already done!

TIP: You can quickly switch to a previously used format expression by hitting DOWN (or right-click) when you're in the editor.
FileBot is free software. Please help support FileBot by writing a review or considering a donation.
Image

Post 09 Dec 2011, 10:23
rednoah User avatar
The Source

Posts: 4499
Location: Taipei

TV Shows & Anime

The most simple s00e00 scheme to get you started
{n} - {s00e00} - {t}

A simple "rename & organize into folders" scheme plus zero-padding for the season folder and language tags for subtitle names
X:/TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}{'.'+lang}

Similar to the default s00e00 format, but automatically clean up brackets (e.g. The Office (UK) => The Office), normalize apostrophes, don't allow ALL UPPER CASE WORDS (change to All Upper Case Words), replace part information "Pilot (1..n)" to "Pilot, Part 1..n"
{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}

Use series name, SxE numbering, codec information and crc32 checksum
{n.space('_')}_-_{sxe}_[{resolution}_{vc}_{ac}][{crc32}]

Date pattern adding the week day localized to your system language:
{n} [{airdate.format("yyyy.MM.dd, EEEE", Locale.getDefault())}] {t}

Basic S00E00 format without spaces. Anime episodes without season will default to season 01. This one is supposed to work very well with XBMC:
{n.space('.')}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t.space('.')}

Organize episodes into "Season N" folders with specials being organized into folder "Specials" named as Season 0. Also great for XBMC:
X:/TV Shows/{n}/{episode.special ? 'Special' : 'Season '+s}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t}



Movies & Subtitles

Movie (Year) adding part index (for multi-part movies) and language code (for subtitle files)
{n} ({y}){" CD$pi"}{".$lang"}

A simple "rename & organize into folders" scheme
X:/Movies/{n} ({y})/{n} ({y}){" CD$pi"}

Special case to add ".CD1" to .nfo files that belong to a multi-CD set (e.g. movie-cd1.avi, movie-cd1.nfo, movie-cd2.avi, ...) as required by HTPC software like YAMJ/Popcornhours's NMJ.
{n} ({y}){".CD$pi"}{if (ext == 'nfo' && folder.list().find{it =~ /(?i:CD\d+)/}) ".CD1"}

Same as the above replacing the language code with the localized language name
{n} ({y}){" CD$pi"}{"."+lang.getDisplayName(Locale.getDefault()).lower()}

Only organize into folders but do not change filenames.
X:/Movies/{n} ({y})/{fn}

Organize movies into folders but keep files on the same drive
{file.path[0]}:/Movies/{n} ({y})/{n} ({y}){" CD$pi"}

Movie name/year and genres followed by the first three actors names.
=> Avatar (2009) [Action, Adventure, Fantasy, Science Fiction] - Sam Worthington, Zoe Saldana, Sigourney Weaver
{n} ({y}) {genres} - {actors.take(3).join(', ')}

Organize movies into collections and folders and add resolution and audio codec/channels to the filename. Preserve video source (e.g. BluRay) and 3D labels in the filename.
=> X:/Movies/Avatar Collection/Avatar (2009) [BluRay]/Avatar (2009) [3D, 720p, AAC, 6ch]
X:/Movies/{"$collection/"}{n} ({y}){" [$source]"}/{n} ({y}) [{"${fn.match(/3D/)}, "}{vf}, {ac}, {af}]

Organize and separate Movies and 3D Movies.
=> 3D Movies/Avatar (2009) [3D] [H-SBS]/Avatar (2009) (720p) H-SBS.mp4
{fn =~ /3D/ ? '3D Movies' : 'Movies'}/{n} ({y}){fn =~ /3D/ ? ' [3D] [H-SBS]' : ''}/{n} ({y}) ({vf}){fn =~ /3D/ ? ' H-SBS' : ''}{' CD'+pi}



Advanced Format Expressions

Here's some examples and snippets for more advanced naming logic. Modify to your needs. Anything is possible. ;)

Sort into drive with the most free space:
{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}

This format will always evaluate to a path to the drive with the most free space, unless the series folder already exists on one of the drives in which case it'll prefer the existing one.

Sort into multiple drives based on initial letter:
{n[0].match((~/(?i)[0-9a-f]/):'X', (~/(?i)[g-t]/):'Y') ?: 'Z'}:/TV/{n}/{episode}

Drive X if first letter of {n} matches [0-9a-f], Drive Y for [g-t] and Drive Z for everything else.

Sort into different folders depending on whether the season is complete or not:
{n}/Season {s} {model.values().containsAll(episodelist.findAll{it.season == s}) ? 'COMPLETE' : 'INCOMPLETE'}/{episode}

Sort into Season {s} COMPLETE|INCOMPLETE folders depending in whether the output model contains all Episode objects for the season of the give episode object.


Automated Media Center Defaults

These are the default format expressions used in the AMC script and will create a structure that should work very well with any media center.

TV Series
TV Shows/{n}/{episode.special ? "Special" : "Season "+s.pad(2)}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’ʻ]/, "'").replaceAll(/[!?.]+$/).replacePart(', Part $1')}{".$lang"}

Anime
Anime/{n}/{n} - {sxe} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").replacePart(', Part $1')}

Movie
Movies/{n} ({y})/{n} ({y}){" CD$pi"}{".$lang"}

Music
Music/{n}/{album+'/'}{pi.pad(2)+'. '}{artist} - {t}



Note: If you're passing any format expression in via cmdline you must escape it correctly (e.g. replace all " in the format with \").
FileBot is free software. Please help support FileBot by writing a review or considering a donation.
Image


Posts: 1
Spent a bit of time on my format expression (especially since it took me a while to figure out that by putting the brackets INSIDE the {} instead of outside that it would not append empty []'s to my file names if the bindings were undefined XP) so I thought I should share it here so others can see it. Anyways, here you go:

F:/{n}{"/Season $s"}/{n} - {s}{e.pad(2)} - {t}{" [$airdate.year]"}{" [$vf]"}{" [$source]"}{" [$vc]"}{" [$ac]"}{" [$group]"}


This takes my files, organizes them by series and season, then renames them and appends the info tags ONLY if the info exists.

Example 1 (source and group unknown):
American Dad - 101 - Threat Levels.avi
became
F:\American Dad!\Season 1\American Dad! - 101 - Pilot [2005] [384p] [XviD] [MP3].avi

Example 2 (all info known):
american.horror.story.s01e01.720p.hdtv.x264-orenji.mkv
became
F:\American Horror Story\Season 1\American Horror Story - 101 - Pilot [2011] [720p] [HDTV] [x264] [AC3] [ORENJi].mkv

NOTE 1: For the source and group bindings to work the file name must already include them in some form so that FileBot can read and parse the data from it.

NOTE 2: For the video format, video codec, and audio codec bindings to work you need to have MediaInfo installed and working. Reference
Q: Why does MediaInfo not work? I'm running on 64-bit Windows and installed FileBot x64?
A: If you're on 64-bit Windows but are actually running a 32-bit Java runtime, the whole java process will be in 32-bit compability mode, so the mediainfo native library also has to be the 32-bit version. Just install FileBot x86 instead, or replace mediainfo.dll with the 32-bit version.
from the FAQ if you are having trouble.

Hope this helps!

edit: fixed code to use the year the episode aired rather than the series premier year returned by the {y} binding.


Posts: 14
Here's the format expression I use. It's very similar to scene formatting standard but is cleaned up a bit.

{n.upperInitial().space('.').replaceAll(/[,]+/)}.{s00e00}.{t.upperInitial().space('.').replaceAll(/[,]+/)}{'.'+vf.match(/720[pP]|1080[pP]/)}{".$source"}{".$vc"}{'-'+fn.match(/(?:(?<=[-])\w+$)|(?:^\w+(?=[-]))/)}


It does the following:

1. Replaces all spaces in the series name with periods, removes all commas and capitalizes the first letter of every word.
2. Appends season and episode number in format S00E00.
3. Replaces all spaces in the episode name with periods, removes all commas and capitalizes the first letter of every word.
4. Appends video format ONLY if 720p or 1080p.
5. Appends source if available.
6. Appends video codec if available.
7. Appends group if the original file is in the format "blahblah-group.avi" or "group-blahblah.avi". (Change to {"-$group"} to match to filebot group list instead)


Example 1

Before:
chuck.101.dvdrip-rwd.avi

After:
Chuck.S01E01.Chuck.Versus.The.Intersect.DVDRip.XviD-rwd.avi

Example 2

Before:
runner-batman-s01e01.avi

After:
The.Batman.S01E01.The.Bat.In.The.Belfry.XviD-runner.avi

Example 3

Before:
aaf-watxm.s01e01.720p.mkv

After:
Wolverine.And.The.X-Men.S01E01.Hindsight.(1).720p.x264-aaf.mkv

EDIT: Changed season+episode numbering as per suggestion from rednoah to inbuilt expression that handles special cases and multi-episodes.

Post 30 Jan 2013, 19:21

Posts: 1
Quite new to this tool but it is rather awesome so I thought I'd share this after working it out!

It's kind of an 'everyman' code to move and rename files into a fairly simplistic format.
E:\Videos\{def a; new File('E:/Videos/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()}\Season {s.pad(2)}\{es*.pad(2).join(' & ').replaceAll('null',{episode.special ? 'Special '+special.pad(2):''})} - {t.upperInitial().replaceAll(/[?.:]/).replacePart(' (Part $1)')}


Having shared this with my brother (on mac) we hit some issues with it (to do with file paths and such) and it needs to be done like this to work (basically just exact past no ~ shortcuts and swapped \ for / in the file path.
/Users/Symon/Television/{def a; new File('/Users/Symon/Television/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()}/Season {s.pad(2)}/{es*.pad(2).join(' & ').replaceAll('null',{episode.special ? 'Special '+special.pad(2):''})} - {t.upperInitial().replaceAll(/[?.:]/).replacePart(' (Part $1)')}


What it does is:
1) Move files into:
E:/Videos/Show Name/Season 00/00 - Title


2) Has an inbuilt force show name directed at
E:/Videos/names.csv
Using the format of:
Actual Show Name;Show name you want


This also proves handy for forcing extra folders in example:
Avatar: The Last Air Bender;Avatar/The Last Air Bender
The Legend of Korra;Avatar/The Legend of Korra

Causes these two shows to be neatly organised into E:/Videos/Avatar/Show Name/Season/Episode

3) Inbuilt multi-part episode handle that outputs format of
01 & 02 - Title


4) Replaces part numbers on episodes with (Part 0)

5) If a special episode is included it is placed within its related Season and formatted as Special 00 - Title

6) General house-keeping. Capitalises first initials for all words on show title and episode titles + knocks out ? . and : from titles (probably could do with a few more knockced out but I just add in illegals as I find em)

rednoah User avatar
The Source

Posts: 4499
Location: Taipei

The format engine allows you to fully automatically make any kind of change to show names and episode titles via Groovy expressions.

Q: Some episodes start with '...Name' - Is it possible to ignore the dots when renaming?
A: Sure, just use after(regex) function.
{t.after(/^[.]+/)}
FileBot is free software. Please help support FileBot by writing a review or considering a donation.
Image

Omertron Power User

Posts: 9
This is the format that I use for YAMJ (and should work well with any other media center)

..\{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {'('+y+')'}\{n} {'('+y+')'}{'.'+source}{'.'+vf}{".[CD$pi]"}{fn.match(/[.]fanart|[.]mkv/)}


All my movies are staged into a directory that I rename from and check before moving to my main movie folder.

"..\" moves the movie from it's staging directory to a correctly named folder
{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {'('+y+')'}\

Renames the folder to be "name, the (year)" for better sorting

{n} {'('+y+')'}{'.'+source}{'.'+vf}{".[CD$pi]"}{fn.match(/[.]fanart|[.]mkv/)}

Renames the file to be "the name (year).format.resolution.[cd#]"


Posts: 9
Here are mine used in a CLI script and as a callback when downloads finish:

1. Append a list of genres to the movies - :

"movieFormat=Movies/{n} ({y}) {genres}/{n} ({y}) {genres}{\" CD$pi\"}{\".$lang\"}"

ex: Media Library\Movies\12 Rounds (2009) [Action, Adventure, Drama, Thriller]\12 Rounds (2009) [Action, Adventure, Drama, Thriller].avi



2. Append a list of genres of a tv serices and add year if year not already in series name (it does this by removing the year from title using replace function):

"seriesFormat=TV Shows/{n.replaceAll(\" \\(\" + y + \"\\)\",\"\")} ({y}) {genres}/{episode.special ? \"Special\" : \"Season \"+s.pad(2)}/{n} - {episode.special ? \"S00E\"+special.pad(2) : s00e00} - {t.replaceAll(/[\`\Â\´\â\€\˜\\â\€\™\Ê\»]/, \"'\").replaceAll(/[!?.]+$/).replacePart(', Part $1')}{\".$lang\"}"


ex: Media Library\TV Shows\Battlestar Galactica (2003)  [Action, Adventure, Drama, Science-Fiction]\Season 01\Battlestar Galactica (2003) - S01E12 - .avi
ex: Media Library\TV Shows\Fringe (2008) [Drama, Science-Fiction]\Season 01\Fringe - S01E01 - Pilot.avi

ashfallen0 User avatar
Power User

Posts: 29
I'm not the greatest at REGEX, so I've had to more or less slave over my expressions(and to make them CLI/XBMC/Anidb/TVDB friendly :roll: )

Here's my current TV expression:
/home/user/tv/{n.replace(':',' -').replaceAll(/[?]/, '')}/{n.replace(':',' -').replaceAll(/[?]/, '')} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replace(':',' -').replaceAll(/[?]/, '')} {[hpi]}{'['+resolution} {' '+vc}{'-'+ac+']'}

Here's my current Anime expression:
/home/user/anime/{(primaryTitle ?: n).replace(':',' -').replaceAll(/[?]/, '')}/{(primaryTitle ?: n).replace(':',' -').replaceAll(/[?]/, '')} - {episode.special ? "S"+special.pad(2) : absolute.pad(3)} - {t.replace(':',' -').replaceAll(/[?]/, '')} {[hpi]}{'['+resolution} {' '+vc}{'-'+ac+']'}
Image PHPBB3 hates me.

g3rman Donor

Posts: 14
Here's what I came up with:

filebot -rename -r "F:\Downloads" --db thetvdb -non-strict --format "F:\British TV\{folder.path.match(/Arts and Culture|Comedy|Documentary|Drama|Game Show|Horror|Kids|Motoring|Music|Mystery|Planes and Trains|Property|Radio|Reality|Sci-Fi|Soaps|Special Events|Talkshow|Travel/)}\{n.replaceAll(':|\\?',' -').replaceAll('(?i)\\s-\\s\\(uk\\)|(?i)\\s\\(uk\\)')}\Series {s}\{n.replaceAll(':|\\?',' -').replaceAll('(?i)\\s-\\s\\(uk\\)|(?i)\\s\\(uk\\)')} - {S00E00}"


Before:
F:\Downloads\Comedy\The Graham Norton Show s14e03.hannibal\The Graham Norton Show s14e03.hannibal.avi

After
F:\British TV\Comedy\The Graham Norton Show\Series 14\The Graham Norton Show - S14E03.avi

I have a set number of genres (comedy,documentary, etc) that I sort my shows by. I wanted to keep that list and not add genres as per TvDB.
With the help of rednoah I constructed the {folder.path.match} expression. I was initially matching on the the folder name two levels above the
avi file but sometimes the number of subfolders changed which required the use of folder.path.match.

Also certain shows will have a suffix of (UK). Since I'm only interested in UK shows anyways the expression will remove any (UK) from the filename.

Ambroisie Supporter

Posts: 18
The followings are my format exxpressions for TV series, movies and music (names maybe in french ;-) ) :
[It's a long post]

  • Series :
    Expression wrote:
    E:/Video/Séries/{n}/{"Saison ${s.pad(2)}"}/{n} - {s.pad(2)}x{e.pad(2)} - {t}

    Which creates :
    Output wrote:
    E:\Video\Séries\Firefly\Saison 01\Firefly - 01x01 - Serenity.avi

  • Films :
    Expression wrote:
    E:/Video/Films/{"$collection/"}{n} ({y}){ [{"${fn.match(/3D/)}, "}{"${cf}, "}{"${hpi}, "}{"${vc}, "}{"${ac}"}]}

    Which creates :
    Output wrote:
    E:\Video\Films\Avatar Collection\Avatar (2009) [3D, mkv, 720p, x264, ac3].mkv

  • Musics :
    Expression wrote:
    E:/Musique/{n}/{"$album/"}{"${album}."}{"${pi.pad(2)} - "} {t}

    Which creates :
    Output wrote:
    E:\Musique\Les Fatals Picards\Coming Out\Coming Out.02 - Dans mon verre.mp3

Ithiel User avatar
Power² User

Posts: 196
Hi guys, I had a separate thread about this one, but figured I'd add the updated version to the sticky :-)

The three types are 'Movies', 'TV Shows', and 'Anime'.

-----------------------------------------------------------------------------------------------------------------------------

Movies:
Includes:
    Organises movies based on 'collection',
    All names converted to Title Case (should re-capatalise Roman numerals though)
    List both Primary & Alternate Title (i.e. English & Japanese) if different
    Moves the 'The's to the end
    Replaces invalid characters from file, folder, and collection name
    Shows year and rating in the folder name
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Uncut, Directors Cut, Unrated, Uncensored & Special Edition references
    Supports multi-part movies

Examples:
\\mynas\media\Movies\Twilight Saga, The\Twilight Saga - Eclipse, The (2010 PG-13)\Twilight Saga - Eclipse, The [720p x264 DTS 6ch].mkv
\\mynas\media\Movies\Rurôni Kenshin - Ishin Shishi E No Requiem (Samurai X - The Motion Picture) (1997 PG-15)\Rurôni Kenshin - Ishin Shishi E No Requiem [480p DivX MP3 2ch].avi
\\mynas\media\Movies\Alien Collection\Aliens (1986 R)\Aliens (Special Edition) Part 1 [360p XviD AC3 6ch].avi
\\mynas\media\Movies\Alien Collection\Aliens (1986 R)\Aliens (Special Edition) Part 2 [360p XviD AC3 6ch].avi
\\mynas\media\Movies\Sanctum 3D (2011 R)\Sanctum 3D [720p x264 AAC 6ch].mp4


//mynas/media/Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}


-----------------------------------------------------------------------------------------------------------------------------

TV Shows:
Includes:
    Season Based Folders & Episode Numbering
    All names converted to Title Case (should re-capatalise Roman numerals though)
    Includes full show name and episode title
    Replaces invalid characters from file and folder name
    Shows year and rating in the folder name, then organises episodes based on season or specials
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Uncut, Directors Cut, Unrated, Uncensored & Special Edition references

Examples:
\\mynas\media\TV Shows\Pushing Daisies (2007 TV-PG)\Season 01\Pushing Daisies S01E01 Pie-Lette [360p XviD MP3 2ch].avi
\\mynas\media\TV Shows\Slap, The (2011 TV-MA)\Season 01\Slap, The S01E01 Hector [360p XviD MP3 2ch].avi
\\mynas\media\TV Shows\Straits, The (2012)\Season 01\Straits, The S01E01-E02 Proposition & The Trouble With Raskols, The [360p XviD MP3 2ch]
\\mynas\media\TV Shows\Looney Tunes (1930)\Season 1943\Looney Tunes S1943E01 Coal Black And De Sebben Dwarfs [240p MPEG MPEG Audio 2ch].mpeg


//mynas/media/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}


-----------------------------------------------------------------------------------------------------------------------------

Anime:
Includes:
    Absolute Episode Numbering (2 or 3 digits, auto calculating)
    All names converted to Title Case (should re-capatalise Roman numerals though)
    List both Primary & Alternate Title (i.e. English & Japanese) if different, and includes full episode title
    Moves the 'The's to the end
    Replaces invalid characters from file and folder name
    Shows year and rating in the folder name
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Uncut, Directors Cut, Unrated, Uncensored & Special Edition references

Examples:
\\mynas\media\Anime\Blade Of The Immortal (Mugen No Juunin) (2008)\Blade Of The Immortal - 01 - Criminal [576p x264 AAC 2ch].mp4
\\mynas\media\Anime\Freezing (2011 N A)\Freezing - 01 - Untouchable Queen (Uncensored) [720p x264 AAC 2ch].mkv
\\mynas\media\Anime\One Piece (1999 TV-PG)\One Piece - 001 - I'm Luffy! The Man Who's Gonna Be King Of The Pirates! [480p XviD MP3 2ch].avi
\\mynas\media\Anime\Eternal Aseria, The [Eien No Aseria] (2005)\Eternal Aseria, The - 01 - Voice Of Motome [480p XviD MP3 2ch].avi


//mynas/media/Anime/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)} - {absolute.pad(episodelist.size() < 99 ? 2 : 3)}{'Special '+special.pad(episodelist.size() < 99 ? 2 : 3)} - {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}


Note: The anime scheme is for anime series. While you can use it for anime movies, IMO you're best to use the movie format (assuming it's listed on IMDB, theMovieDB or OpenSubtitles).

-----------------------------------------------------------------------------------------------------------------------------

OP: http://www.filebot.net/forums/viewtopic.php?f=5&t=1205

Note: It kind of goes without saying, but be sure to replace '//mynas/media/' and what not with the path to wherever you're storing all your stuff.


MINIMUM VERSION REQUIREMENTS: You must have at least filebot-3.8-r1950 (released 2013/12/28) for the above to function properly. ^.^

Cheers,

~Ithiel

(Last Updated 2014/01/06)

UPDATE: Like this naming scheme? Check out this Advanced Windows Context Menu script for Windows that comes pre-configured with all this wizardry (and more cool stuff)
http://www.filebot.net/forums/viewtopic.php?f=3&t=1222
There can be only one Power² User


Posts: 22
Movies (Filebot 4.1)
../{primarytitle}{' ('+net.filebot.WebServices.IMDb.scrape(imdbid, '''//SPAN[@class='title-extra']''').match('"(.+)"')+')'} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}


Movies (Filebot 4.0)
../{primarytitle}{' ('+net.sourceforge.filebot.WebServices.....


I store my movies all in a seperate folder, to be able to navigate and extraxt as mauch info as possible when I have no tool for that (I use XBMC as media center). This makes it easy for me to search for low quality, special editions, etc.
Ilike to have the original titles of movies, so I use the special scraper. I also like to have extended info like special editions, resolution and audio quality to search for.

Examples
Folder: EnglishTitle (2013) [1080p] [DTS-HD.MA.6ch]
Movie: EnglishTitle (2013) x264.mkv

Folder: EnglishTitle (OriginalTitle) (1998) [576p] [AC3]
Movie: EnglishTitle (1998) XviD.avi

Folder: EnglishTitle (2001) [Extended] [1080p] [AC3]
Movie: EnglishTitle (2001) XviD


Episodes (FB 4.1)
../{n}{' ("'+net.filebot.WebServices.IMDb.scrape(imdbid, '''//SPAN[@class='title-extra']''').match('"(.+)"')+'")'} ({y})/{"Season ${s.pad(2)}"}/{n} {s00e00} {t} [{vf}]{' '+lang}


Episodes (FB 4.0)
../{n}{' ("'+net.sourceforge.filebot.WebServices...


This script is quite simple except the original title part at the beginning. Since I have some german tv shows I like to get correct titels for them. Rest is just standard. I do not use extended info here, because I want all shows in one folder per season.

Example
Folder: EnglishTitle\Season 1
Show: EnglishTitle.S01E01.ShowTitle.mkv


Posts: 1
The ones I am using. Major thanks to Ithiel and Rednoah for some of the parts.

Movies:

{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.,]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};isLatin = {java.text.Normalizer.normalize(it, java.text.Normalizer.Form.NFD).replaceAll(/\p{InCombiningDiacriticalMarks}+/, '') ==~ /^\p{InBasicLatin}+$/}; isLatin(info.OriginalName) ? norm(info.OriginalName) : norm(primaryTitle) }.({y}){if(isLatin(info.OriginalName) && info.OriginalName != primaryTitle && !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)) '.'+ norm(primaryTitle) }{'.'+vf}{'.'+source}{fn.contains('3D') || fn.contains('3-D') ? '.3D':''}{'.'+fn.replace(/(?i)\.DC\./, '.directors.cut.').replaceAll(/director\'?s|theatrical|ultimate/,'$0.Cut').matchAll(/UNCENSORED|UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTOR\'?S.CUT|THEATRICAL.CUT|ULTIMATE.CUT|FINAL.CUT|SPECIAL.EDITION/)*.upperInitial()*.lowerTrail().sort().join('.')}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}


I am using the original title if it the alphabet used is latin based. If the original title is not the same as the english title, and the first spoken language is not Swedish, Norwegian or Danish I will add the English title as part of the filename. This way I can keep the original titles which I prefer, but still have a chance to find them/connect them to the English titles most commonly used when talking to people. The Nordic stuff is because I live there so I know which movies they are.
If you want to use the format but don't want the special hack for Nordic stuff remove the text: "&& !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)"
The audio/movie codecs are hacked a bit to be named by their real/common names instead of the ones defined by mediainfo. I.e. DTS-HD MA, MP3, VC-1 instead of DTS MA Core, MPEG Audio and Microsoft respectively.

Examples:
Kôkaku.Kidôtai.2.0.(2008).Ghost.In.The.Shell.2.0.720p.REPACK.x264.DTS.5.1-timeshift.mkv // Latin characters but added english name
Jagten.(2012).1080p.BluRay.x264.DTS-HD.MA-GRYM.mkv // Original name only, primary language is Danish
My.Sassy.Girl.(2001).720p.BluRay.x264.AC3.5.1-EbP.mkv // Actual name is 엽기적인 그녀, or transliterated to Yeopgijeogin Geunyeo


I would have loved to figure out how to keep the transliterated names, but using {transliterate(info.OriginalTitle)}did not work perfectly, which meant a bunch of titles missed when doing searched.
For my sassy girl the transliteration was something like Yeobgi-jeogin Geunyeo or the like, which is really close, but far away to miss some lookups.

NOTE: I do not care for multipart files so I do not support them. I rip my movies as single files without any splits.



Series is a bit simpler as I only care about the name we get from TheTVDB (I have long since abandoned any hope that they'll change their mind and structure series as they were intended instead of simply how they where broadcasted):

{n}/{episode.special ? 'Specials' : 'Season '+s}/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};norm(n) }.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{norm(t)}{'.'+vf}{'.'+source}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}


NOTE: I do not pad the season numbering (i.e. I use Season 1, Season 2 instead of Season 01, Season 02).
Specials end up in a /Specials folder instead. Same thing for video/audio as movies have.

Examples:
Coupling\Season 1\Coupling.S01E01.Flushed.360p.DVDRip.x264.AAC.mkv
Doctor Horrible's Sing-Along Blog\Season 1\Doctor.Horrible's.Sing-Along.Blog.S01E01.Act.I.1080p.BluRay.x264.DTS-DIMENSION.mkv




If anyone wants to copy my thing entirely the script I use to sort everything is:
filebot -script fn:amc "x:/downloads" --log-file d:\amc-run.log --output "//nas/" --action move --conflict skip -non-strict --def clean=y --def "movieFormat=Movies/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.,]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};isLatin = {java.text.Normalizer.normalize(it, java.text.Normalizer.Form.NFD).replaceAll(/\p{InCombiningDiacriticalMarks}+/, '') ==~ /^\p{InBasicLatin}+$/}; isLatin(info.OriginalName) ? norm(info.OriginalName) : norm(primaryTitle) }.({y}){if(isLatin(info.OriginalName) && info.OriginalName != primaryTitle && !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)) '.'+ norm(primaryTitle) }{'.'+vf}{'.'+source}{fn.contains('3D') || fn.contains('3-D') ? '.3D':''}{'.'+fn.replace(/(?i)\.DC\./, '.directors.cut.').replaceAll(/director\'?s|theatrical|ultimate/,'$0.Cut').matchAll(/UNCENSORED|UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTOR\'?S.CUT|THEATRICAL.CUT|ULTIMATE.CUT|FINAL.CUT|SPECIAL.EDITION/)*.upperInitial()*.lowerTrail().sort().join('.')}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}" --def "seriesFormat=TV Shows/{n}/{episode.special ? 'Specials' : 'Season '+s}/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};norm(n) }.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{norm(t)}{'.'+vf}{'.'+source}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}"


NOTE: Remember to update the paths to your series/movies and downloads.
Paste everything into a file called amc.cmd or something and double click it to run it.


Return to Episode / Movie Naming Scheme