Scripts to rename avi files from TV Shows

If you got a lot of ill-named files like: $ ls S01E03.The.Sopranos.S01E03.Denial.Anger.Acceptance.avi The.Sopranos.1x04.Meadowlands.avi The.Sopranos.S01E01.The.Sopranos.avi The.Sopranos.S01E02.46.Long.avi The.Sopranos.S01E06.Pax.Soprana.avi The_Sopranos.105.College.avi that your divx player can’t sort properly and you want to end up with something like: $ ls 1x01.avi 1x02.avi 1x03.avi 1x04.avi 1x05.avi 1x06.avi you can use the following script in this way: cd /path/to/avi/files ../script.sh|sh and if you want to do the same thing to srt files then: cd /path/to/srt/files ../script.sh srt|sh As an example the script will normalize any of the following patterns S01E03, 103,1x03, or just 03 to 1x03. ...

July 5, 2007