episode_rename... well... renames episodes. Who would have guessed :)
It's a small Perl-Script that parses filenames like 'Desperate.Housewives.S05E22.PROPER.720p.HDTV.x264-CTU.mkv', tries to guess the name of the show, season and episode, looks up the information on http://thetvdb.com and renames the file to, in this case 'Desperate Housewives - 5x22 - Marry Me a Little.mkv'
Batch renaming multiple files, overriding the name of the show, custom rename-patterns and even renaming to the titles in different languages is supported.
Download the gzipped Source here.
You need a running and working Perl-Installation on preferable a Linux-Box (although probably any OS running Perl should do just fine).
Then, make sure, the following Perl-Modules are installed (in braces you'll find the names of the Debian/Ubuntu-Package):
If the requirements are met, download and unpack the Source, make the file executable and put it in your path. You should be good to go.
episode_rename -options <file1> <file2> ...
When you batch rename files from multiple shows, don't use the -y-Switch unless you're absolutely sure, the script will recognise all shows correct.
The preferred use-case is a directory with files from one show only. Execute `episode_rename *` (maybe supply the show via the -s-Switch) and if the first suggestion looks correct, abort the script (CTRL-C) and rerun it with an added -y-Switch. Sit back, wait a few moments and enjoy.
Due to the loose way, the filenames are parsed, the script probably will fail, when there's a year written in the filename before the season/episode. For instance the file 'Batman.1966.S01E01.avi' will not be parsed correctly. Unfortunately, the only workaround is to remove the year first (On debian-based system the tool `rename` should do the trick easily).
Multi-Episodes will at the moment not be handled correctly (the resulting file will be named as if it was only the first part).
Due to the likely increased complexity at parsing the filenames, those problems will likely not be resolved by me, however I would be glad to accept patches as long as they don't break existing behaviour.
Using mirrors of http://thetvdb.com/ is not yet supported as there aren't any at the moment :)
The current version is 0.9 (since 2009-05-24). This is the first public release after a major rewrite to use the great database at http://thetvdb.com/.
episode_rename is released under the Perl Artistic License. That basically means, you can do whatever you want with it, as long as you keep the Copyright-Notes in :)
If you like episode_rename, encounter a strange bug or want to send me a thank-you-note, just drop me a few lines :)