Pretag is a project mainly written in ..., it's free.
Perl Regular Expression [ID3] Tag [Tool]
PRETag (or Perl Regular Expression [ID3] Tag [Tool]) allows you to tag your MP3 files using Perl regular expressions. Who would have thought! Run with -h for all the information you need, including examples.
For your convencience, I've pasted the output of pretag -h here so you don't have to install it to see if it is what you're looking for.
Usage: /home/jkramer/scripts/pretag <-p pattern> [optional stuff] [bunch of MP3 files]
-p
-v | --verbose Print lots of information about what's going on.
-h | --help Print this help text and quit.
-d | --dry-run Don't actually do anything (only useful with -v to see what would be done if you had not used -d).
-c | --title-case Try to fix the title case of found tags.
-N
-z
-r
-u | --update Update the MP3 files ID3 tags with the information captured from the file name and/or defined as command line argument.
Note: Even if you have specified a tag in your regular expression, if you also define the tag using one of the options below, it will override the one found in the file name.
-a
-l
-t
-n
-y
-o
-g
Examples
Assuming you pirated the album "Back on the Streets" by 88 Fingers Louie somehow (don't do that, it's illegal!), but the ID3 tags are in bad shape and you don't like the file names because they look like this:
[01] - 88 fingers louie - tomorrow starts today.mp3 [02] - 88 fingers louie - selfish means.mp3 ...
Then you might try this.
/home/jkramer/scripts/pretag -p '^[(?
Adding -v, the script would print something like this:
[01] - 88 fingers louie - tomorrow starts today.mp3: Artist: 88 Fingers Louie Album: Back on the Streets Title: Tomorrow Starts Today Track: 01 Year: 1998 Genre: Hardcore Comment: Writing tags for [01] - 88 fingers louie - tomorrow starts today.mp3. ...
Use -r to rename files using the freshly detected meta data.
For example, add this to the command above:
... -z 2 -r '
This will rename the file in the example above from '[01] - 88 fingers louie - tomorrow starts today.mp3' to '01 - Tomorrow Starts Today.mp3'.