"Create new names based on MP3 ID3 tags"

TARGET FILES:
MP3 music files (*.mp3) with ID3v1.x or ID3v2.x tags.

CASE:
Many of us have huge collections of MP3 files. Most of these files have unreadable names such as "track01.mp3", "artist_song04.mp3", "untitled37.mp3", etc. Renaming these files manually can be a really exhausting task, particularly if you have hundreds or thousands of files.

SOLUTION:
These MP3 files have ID3 tag information which can be used by NIYoW to create a new, readable, filenames. This set uses this information to create the new names while also being able to handle even incomplete tags to create the names. The filename format created by this solution is: "Artist - Track- Title.mp3". You can change it later to match it to your needs.

Example FILEname:
Before: "track01.mp3"
After: "01 - Robert Miles - Children.mp3"

Download NIYoW:
In order to use this set, you must have NIYoW installed. Don't have NIYoW yet? Download now!

DOWNLOAD SET:
http://www.niyow.com/rules/mp3_example01.rls

THE RULES:

#
Rule
Parameters
Description
1
Miscellaneous: "Skip rule if causing validation error" Skip Rules="True" To handle incomplete tags, we choose to ignore rules that cause validation errors. Rule happens to be invalid when one or more of its variables returns empty result.
This will be used to skip empty ID3 tag fields.
2
Title & Extension: "Create a new name"

New Text=""

Apply To="Title"

Clear the title of the filename. We want to create a new name from scratch.
3
Title & Extension: "Attach text to edge of name"

Insert This="%id3v2_title ELSE id3v1_title% - "

Insert Where="Start"

Apply To="Title"

This rule tries to add the title of the song to the new name using the "id3v1_title" and the "id3v2_title" variables. Using the "ELSE" word it tries to retrieve the title from the ID3 v2.x, if not found, tries to get it from ID3 v1.x. If both variables cannot be retrieved, a validation event will occur and the whole rule will be skipped as specified by rule #1.
4
Title & Extension: "Attach text to edge of name"

Insert This="%id3v2_artist ELSE id3v1_artist% -"

Insert Where="Start"

Apply To="Title"

This rule is identical to the previous one, except it is intended to add the artist of song.
5
Title & Extension: "Attach text to edge of name"

Insert This="%id3v2_track ELSE id3v1_track% -"

Insert Where="Start"

Apply To="Title"

This rule is identical to both previous rules, except it is intended to add the track of song.
Note that even though the order of fields is title, artist and then track, the result will be exactly in the opposite order.
6
Title & Extension: "Remove characters from position"

Starting Position="1"

Length="3"

Remove Direction="Right to Left"

Apply To="Title"

The three previous rules added a separator (" - ") at the end of each rule to separate between the filename parts. Since we have one extra separator we have to remove it.
7
Letters: "Change capitalization"

Capitalization Type="First Letter Up"

Apply To="Title"

Capitalize the text to make it look better.

Possible enhancements:

  1. Change the order of filed - Currently, filenames are generated using this format: "track - artist - title.mp3". Play with rules 3-5 and change the order they appear to create new formats. Note that the order the appear in filenames is exactly opposite to the way the appear in the set.
  2. Use other tag fields - The generated filename consists of the following fields: Track, Artist and Track. If you like to use other fields, simply change the variables used. For example, if you want to add the genre of the song instead of the track, change the parameter "Insert This" from "%id3v2_track ELSE id3v1_track% -" to "%id3v2_genre ELSE id3v1_genre% -"
  3. Add more tag fields - Want to add more tag fields? No problem. Simply duplicate one of the rules 3-5, match the variables in the duplicated rule to the tag field variables you need and add it immediately before rule #6.
  4. Put constant value if tag field is empty - You can force NIYoW to put some value even if it can't retrieve it from the file. For example, if you want NIYoW to add the value "No Title" if it can't retrieve the title field from the file, change the "Insert This" parameter in rule #3 to "%id3v2_title ELSE id3v1_title ELSE const=No Title% -". This will order NIYoW to put the constant "No Title" if the title fields is empty. The same can be done for each of the other rules #4 and #5.
  5. Give higher priority to ID3 v1.x tags - Currently, the rules are configured to try retrieving the fields from the ID3 v2.x tag of the files and if it cannot be found, to try ID3 v1.x. ID3 v2.x is more advanced tag type than ID3 v1.x and is more likely to be filled in. Nevertheless, you may have older MP3 files and want to give higher priority to ID3 v1.x. You can do it by switching between the locations of variables in the "Insert This" parameter. For example, to give higher priority to ID3 v1.x in rule #3, change the "Insert This" parameter from "%id3v2_title ELSE id3v1_title% - " to "%id3v1_title ELSE id3v2_title% - ". This can be done also to rules #4 and #5. More information about ID3 tags can be found HERE.

Comments:
This set might seem a bit complex at first. However, understanding how it works gives you the power and the flexibility to complete almost any renaming task.