Share your custom Actions

You can always use the track-numbering wizard for that. :rolleyes:


Here's one.

It uses a string you put in the comment field to sort selected files, and renames the selected files according to what's in the title field. The format for this string is:

genre/subgenre/cd type/disc number

For example: "jazz/bop/1/1" means genre: jazz, subgenre: Bebop, cd type: regular (not a compilation), disc: 1. Running the action would place the selected files in:

\Jazz-=Bebop & Cool=-\artist\album\Disc nr.\track + title.mp3

I made it because my MP3 player doesn't allow me to scroll through long lists easily; using subgenres considerably shorten such lists.

I've another one custom action to trim extra spaces in the end of every field.

For example, you might notice after you apply the Tag -> Filename action, it ends up with something like this.. True Blue - Madonna - Papa Don't Preach .mp3 though you expect it to be True Blue - Madonna - Papa Don't Preach.mp3

So, this is due to the fact that there are some extra spaces after "True Blue", "Madonna" & "Papa Don't Preach" though it appears normal.

So, I use regular expression method to remove the extra spaces.

The regular expression is "\s$" replace it with nothing -"".

I hope that helps. Maybe it can be modified to trim unnecessary spaces on the front-side too.. :slight_smile:

That's already written in the FAQ :slight_smile:

I've created actions for translit-detranslit conversion for russian characters.
See attachment. (1.31 KB)

I've created the action to convert to translit cyrillic filenames. Attached...

filename2translit.mta (3.21 KB)

I just made a bunch of action groups, some derived from ones already available but almost all have some little change to make things more exact (at least for my collection).

  • Trim Trailing/Preceding/Extra Space
  • Spacing…(Proper, Amount)
  • Title Case (It’s a Smart Conversion)
  • Namings (O’Brian, McCarthy, MacDonald)
  • DJ, vs., MC, EP, CD, XVI. (Upper Case)
  • Contraction- Add Apostrophe’s (Can’t, let’s)

Download All (zip)

All of them are explained at my webpage

1 Like

One that I run on my whole MP3 library to standardise them...

  • Keeps all the fields I want and deletes the others

  • Import cover art from file path (folder.jpg)

  • Add comment ("EAC/LAME ~VBR 0")

  • Adds the appropriate disc number (1/1, 1/2, 2/2)

These next ones are a case conversion using '%caps2(string...)' found here:

  • Advanced case conversion on the _FileName field
  • Advanced case conversion on the Title field
  • Advanced case conversion on the Artist field
  • Advanced case conversion on the Album field
  • Advanced case conversion on the Comment field

These next ones help iTunes with sorting

  • Adds the year of album to ALBUMSORTER field
  • Adds the disc number/track number to TITLESORTER field
    (ie: 1/1/1/10; which means - disc one of one, track one of ten)
  • Adds the Artist to PERFORMERSORTER field minus the "The "
    (ie: 'The Beatles' becomes 'Beatles')

All in one simply button.
Then I just make other actions for more specific needs.

(File can be opened in Notepad.exe to view
or can be copied to: "Documents and Settings~USER~\Application Data\Mp3tag\data\actions"
[where '~USER~' is, put your user's name])

Standardize.mta (785 Bytes)

One I just discovered now...

If you want both iTunes and your iPod to play an album gaplessly, try this:

Action - Format Value
Format String - 1

COPY SONGS OFF IPOD :astonished:

If you want to copy someones iPod!

You will know if you have iTunes/iPod that they can only work together and you can only have one library of music per iTunes. In other words, if you tried hooking up your friends iPod to your computer, your iTunes will tell you that it already belongs to another computer's iTunes. Then it will ask if you want to delete all contents and sync your music onto it.
But hey, this isnt what we want to do. We want to copy his contents.

Here's the solution.
If you browse to the music iPod's directory -
here is where you will find all of the mp3s stored. (This is a hidden folder, so unhide it first).
But yup, all the folders, as well as the file names, are all jumbled up! How can you find a song when it's named like this?

This Action Group below will sort it out for you.

It works in two stages...

Firstly, it corrects the file name of the file by doing this -
FILENAME = "%track% - %title%"
Example: 01 - The Hollow.mp3
So as long as your mates music collection contains these two tags, the track number and the title (which he definitely should if he's using an iPod) then this will work.

Secondly, this part off the action will put all of this music into the right place, where you tell it to go!
The '%artist%' and '%album%' tags are used, so this means that you can use this action on the whole of your friends collection with one-single-click! Easy huh?
It will move it to the directory you tell it by doing this -
DIRECTORY = "C:\Documents and Settings\USER\My Documents\My Music\MP3s\%artist%\%album%"
(Please change this according to where you want the mp3s saved, this is purely an example).
So again, as long as this music collection contains the artist and album tags, then this will work too.

You can check if your mate's songs contain the correct tags, track, title, artist, and album by opening one of his songs in MP3TAG and seeing if the tags are filled out.
If they are, which they should be, this will sort all you sorting problems out.

So now instead of having either:
Nsongs from your friend
A jumbled up mess of folders and songs to which you can't understand...
You have a whole library worth of sorted and properly named songs!

CAUTION: Before running this Action, please copy the iPods library "iPod:\iPod_Control\Music" to your computer first! If you run this action without copying it first, you will simply move his whole library to your computer and rename, not copy it! This will leave your mate without any music on his iPod.

So pick any place on your PC (eg: C\Temp\Music) and copy it there. Once there, open MP3TAG and drag that music folder into MP3TAG.
Once you have done this, run the action and sit back and watch.

What do I do with the Action once I have downloaded it?
Put it here -
"C:\Documents and Settings\USER\Application Data\Mp3tag\data\actions" (This is a hidden folder, so unhide it first)(Again, this is purely an example, use your logon name instead of 'USER').

You're done. Have fun.


Copy_iPod_Library.mta (170 Bytes)

For those of us wishing to trim leading and trailing spaces, I have found that using the $trim(x) scripting function in a Format Value is the way to go. And it is very simple.

Create a new action of type Format Value.
In the field select Artist or whatever.

In my case I used Artist, so the format string is $trim(%artist%)

That's all there is to it. it will do 15,000 entries in a couple of minutes on my old, slow machine.


AudioBook set up from Filename data

I listen to a lot of audiobooks. Here are some actions I have created that allow me to set up the Track, Title & Album details from the Filename:

The Filenames always tend to look like this, with the same number format, but the audiobook name, of course, will be different for each story:

Another Fabulous Story 001.mp3
Another Fabulous Story 002.mp3
Another Fabulous Story 003.mp3
Another Fabulous Story 004.mp3

Action to create Track Number:

Action: Format Value
Field: TRACK
Format String: $right(%_filename%,3)

(The underscore in %filename% omits the .mp3 part of the filename.)
The track number fields then look like this: 001 002 003 004 etc

Action to create Album Name:

Action: Format Value
Field: ALBUM
Format String: $left(%_filename%,$sub($len(%_filename%),3))
[Edit - Changed from this to the above $left(%_filename%,$sub($strchr(%_filename%,0),2)) ]

The $strchr function searches for the first occurrence of the number zero, and then that characters position has 2 taken off of it to get the length of the filename without the track numbers and the space before the track numbers.

The Album name for each file, in this case, will be:

Another Fabulous Story

Action to create Title Name

I like to the the Title in my MP3 Player beginning with the track number followed by the Album Name.

Action: Format Value
Field: TITLE
Format String: $right(%_filename%,3) $left(%_filename%,$sub($len(%_filename%),3))

[Edit - Changed from this to the above: $right(%_filename%,3) $left(%_filename%,$sub($strchr(%_filename%,0),2))) ]

The Title of each track will then look like this:

001 Another Fabulous Story
002 Another Fabulous Story
003 Another Fabulous Story
004 Another Fabulous Story

I hope someone finds this useful. If you knw of an easier way I could have done any of this,please let me know.

Many thanks for these, they've been quite useful and were nicely written. I took a few minutes to expand the Contraction filter to include missing ones, and added lists for the suffixes that weren't handled. I also added a rule for first letter and compound contractions ('em 'tis, 'twas, 'twasn't, 'tweren't, 'twon't,).

Unelss I missed a few, this will handle just about all of 'em, excluding those pesky ones with corresponding words (she'd, she'll, he'll, i'd, i'm, it's, we'd, we'd, we'll, who're, 'twill, etc.).

I did leave in a few that can cause a false match because the contraction is much more common than the word: can't (cant), won't (wont) It'd (ITD). We're still out of luck on she'd, she'll, he'll and it's --for now. I know i've seen a script to handle that based on context. If I can find it, I'll post it.

Anyway, figured I'd make my first posts helpful instead of questions, and share a copy for anyone who wants it.

What's handled:

ain't, aren't, can't, couldn't, didn't, doesn't, don't, hasn't, haven't, isn't, mightn't, mustn't, shan't, shouldn't, won't, wouldn't, wasn't, weren't, 
   he's, let's, that's, there's, she's, who's, what's, where's, when's, why's, how's,
   that'll, there'll, they'll, you'll, it'll, who'll, what'll, where'll, when'll, why'll, how'll, 
   could've, i've, might've, must've, should've, they've, would've, we've, what've, you've, 
   he'd, how'd, it'd, that'd, they'd, who'd, what'd, where'd, when'd, why'd, you'd, 
   they're, you're, what're, when're, why're, how're, 
   'em, 'tis, 'twas, 'twasn't, 'tweren't, 'twon't

Contraction__Add_Apostrophe__s__Can__t__let__s_.mta (1.09 KB)

1 Like

Newbie question. How do I import the customs actions so they are visible within the mp3tag?


Read there ...


I just recently grabbed MP3TAG to start working with the Album Artist tag. Previously I had used MP3BookHelper (Sourceforge) with great success, but it hasn't had development since 2004 and doesn't support the Album Artist tag.

Perhaps something similar has already been posted, but here's my contribution anyways:

$if(%band%,%band%,%artist%) - %album% (%year%)$if(grtr(%discnumber%,0),$num(%discnumber%,1)-,)$num(%track%,2). %title%

I have a lot of compilations (mix albums). I use this to rename files to the following format:

    \ARTIST - ALBUM (YEAR)\##. TITLE.mp3

On the ARTIST portion however, if there's an "Album Artist" tag (BAND), then I use it, otherwise I use the "Artist" tag.

I have a lot of VA/compilations and this helps with organizing them. For example, for VA album:

    Track: 01 Title: Fallen Angel (Perfecto Mix) Artist: Traci Lords Album: Perfect Remixes Vol 1 Album Artist: Paul Oakenfold Year: 2004

    Track: 02
    Title: Natural Blues (Perfecto Mix)
    Artist: Moby
    Album: Perfect Remixes Vol 1
    Album Artist: Paul Oakenfold
    Year: 2004

    Track: 03
    Title: The Chase (Perfecto Mix)
    Artist: Giorgio Moroder
    Album: Perfect Remixes Vol 1
    Album Artist: Paul Oakenfold
    Year: 2004

Would be:

    \Paul Oakenfold - Perfect Remixes Vol 1\01. Fallen Angel (Perfecto Mix).mp3 \Paul Oakenfold - Perfect Remixes Vol 1\02. Natural Blues (Perfecto Mix).mp3 \Paul Oakenfold - Perfect Remixes Vol 1\03. The Chase (Perfecto Mix).mp3


    \Traci Lords - Perfect Remixes Vol 1\01. Fallen Angel (Perfecto Mix).mp3 \Moby - Perfect Remixes Vol 1\02. Natural Blues (Perfecto Mix).mp3 \Giorgio Moroder - Perfect Remixes Vol 1\03. The Chase (Perfecto Mix).mp3

And when using it for single artist albums, they would use the "Artist" tag. This has allowed me to open up all the MP3s in MP3TAG, Ctrl+A to select them all and quickly rename them in one easy step.

I've created a few for editing my MP3 collection, where my primary player is iTunes and iPhone:

The one I use most has three parts and cleans out all the tags I don't use, and then formats the track tag in the way that I like (removes the slash and total number of tracks on the album part, and any number of leading zeros).


  1. Remove Fields Except > title;artist;album;track;year;genre;picture;itunescompilation;COMMENT ITUNPGAP;UNSYNCEDLYRICS

  2. Replace with Regular Expression > Track > /.* > (nothing)

  3. Replace with Regular Expression > Track > ^0* > (nothing)

If you want to wipe out Lyrics too, remove the field "UNSYNCEDLYRICS".

I just discovered Soundcrank & Fabio's iTunes Lyric Downloader so I'm rethinking keeping lyrics available. Before my tracks that had them were so random and the content so unreliable or full of spam that I cleaned them all out.


This one is handy for renaming tracks from (for example) live albums or remix versions:

It appends the Album Name to the track title in [Brackets] to differentiate it from the original version of the track from the studio album ... so you don't have two files with the same name when using the "Artist - Track Name.mp3" format.

TAG AS ''Artist - Title [Album]'':

  1. Format Value > Title > %title% '['%album%']'


This one might not work for many people who don't think like me.

I name my files in the "Artist Name - Track Title" format. And I sort my music on my phone and in iTunes by Artist, and then by Album (Chronologically), then track number.

Some albums I have (mostly soundtrack albums) I want the album name (not the artist's name) to be the deciding factor when alphabetically sorting; when usually, I don't include the album name in the file name at all.

So this lets me keep specific Soundtrack Albums together, by inserting the Album name into the Artist name field, and appending the actual Artist info to the Track field. My file name will then be in the format "Album [Artist] - Track Title".

TAG AS "Album [Artist] - Title" FOR SOUNDTRACKS:

  1. Format Value > Title > %title% '['%artist%']'

  2. Format Value > Artist > %Album%

I'll usually wind up shortening the Album Name after, but this gets the hard work out of the way.



I've started downloading Lyrics with "Fabio's iTunes Lyrics Downloader" and "Soundcrank".

I've noticed that sometimes complete lyrics don't download, and there is a message about the service not having licensing rights. Well, partial lyrics are useless to me, so I just delete the lyrics tag from all of those.

Also, I've noticed a few sets of lyrics download with large globs of metadata before the actual lyrics. I want to keep the lyrics, but get rid of the metadata.

So: How to Automate this??

I Noticed that in each instance a specific phrase of text is repeated. In the first case, I just set up a regular expression replace as follows:

.Unfortunately, we are not licensed to display.

And I replace it with nothing; effectively blanking the lyrics field. The variables (.*) see to it that all text, both before and after that phrase, are removed.

In the second, I noticed that the metadata ends with the phrase "Ringtone to your Cell" and that the actual lyrics always begin on the next line from this phrase. So I set up another regular expression replace (with nothing) as follows:

.*Ringtone to your Cell...

The Variable (.*) again gets rid of everything up to Ringtone, and the (...) at the end gets rid of line trailing space and line return so that the lyrics start with the new very first character of the tag.

I also set up a third rule so that the Italian language version of "Instrumental." is replaced with the English (the lyrics apparently are archived on an Italian site).

Finally - how to tell apart the tracks with complete lyrics from the tracks with impartial (and now deleted) lyrics from the tracks with no lyrics tag at all??

I added two new columns to Mp3Tag, that I labeled "N" and "B" for "Not Blank" (or just "Blank").

The value for column "N" is "$iflonger(%UNSYNCEDLYRICS%,10,N,)" and column "B" is "$if(%UNSYNCEDLYRICS%,B,)"

What B does is indicate a "B" if a lyric tag even exists.

What N does is indicate if there are any lyrics in it (more than ten characters). So, "B" is a Blank lyric tab and "N B" is a NOT Blank lyric tab.

From there I just sort by N or B and move the files to different folders so I can process getting new lyrics, or scanning through the ones I've already downloaded.

Took me a couple days to figure this stuff out. So I help my system gives you ideas on how you can use Mp3Tag's advanced features in your own work flow! Blue skies!



Clear_Extraneous_Tag_Data.mta (190 Bytes)

Trim_Leading_Zeroes_from_Track_Numbers.mta (41 Bytes)

Trim_Total_Tracks_from_Track_Numbers.mta (41 Bytes)

Tag_as_Gapless_Album.mta (41 Bytes)

Remove_Gapless_Album_Tags.mta (36 Bytes)

Tag_as_Compilation_Album.mta (42 Bytes)

Remove_Compilation_Album_Tags.mta (37 Bytes)

Tag_as_____Album__Artist____Title____.mta (85 Bytes)

Tag_as_____Artist___Title__Album_____.mta (50 Bytes)

Delete_Partial_Lyrics__But_Keep_Tag.mta (233 Bytes)

Remove_Lyrics_Tag.mta (34 Bytes)

Use the following to avoid steps 2 &3:
Format Value > Title > %title% '['%artist%']'

Or use Guess Values to do it all in one step:
Action: Guess Values
Source Format: %title% '['%artist%']' XXXXX %album%
Guessing Pattern: %title% XXXXX %artist%

Doh! Thanks. I fixed my post. And fixed Attachments.