Replace multiple strings


Apologies if this has been discussed before. I have tried searching the forum and going through help files but couldn't find anything that fulfills all my requirements.

I have a collection of mp3s that I have gathered over the years. I am looking to do some house keeping on my music collection and I think I have found the right tool here to do this :slight_smile: A lot of my music files contains unnecessary tag information like included in various tag fields and file names. I have been playing around with Actions and I think I have found a way to remove the strings from file name and title using _ALL. I have tried to use _TAG to remove from all tag fields but this does not work for some reason. I was wondering if there is any easier way to remove these information from title and tag fields in one go. To make things little worse, not all files have the same tag information. For example, song1 contains and song2 contains etc so there are more than one strings that I am looking to search in all my files and replace in one go. It doesn't matter even if I need to create more than one action as long as the job gets done :slight_smile:

Sorry for the long post. In a nutshell, I am looking for an easier way to:

  1. Remove "-" from "filename -"
  2. Remove, etc from all tag fields including title
  3. Copy tag info from title to filename and number them as 01 - title1, 02 - title2 etc in their corresponding folders (I have managed to achieve part of this using Convert > Tag - Filename)

Many thanks for taking the time to read this and look forward to your suggestions.

  1. : before you twiddle with the filename I would go straight to no. 2...

  2. : You can delete complete fields like WWW with an action of the type "Remove field". To remove the address from TITLE use an action of the type "Replace with regular expression" for TITLE and the search string:
    Leave the replace string empty.

  3. as you want to rename the files anyway (see no. 1) there is no use to replace anything in the filename esp. if you cut the superfluous information from title anyway.
    To rename a file with an action use an action of the type "Format value" for _FILENAME
    Enter as format string:
    $num(%track%,2) - %title%

This only works if you have numbered TRACK correctly. There is no way to number files folder by folder with an action. You have to use the Numbering Wizard to number first, then create the filename.


Thanks for your reply with the suggestions. There are couple of issues with this approach:

  1. If I create an action of the type "Remove field", it asks me to specify the fields. I have also checked "Remove fields except" option which also requires me to specify the fields. I don't want to manually specify the fields as some files contain the correct artist information which I would like to keep whereas some others contain which I want to remove.

  2. Some of the files contain in various fields like comments, artist, www, genre etc while some others contain in these fields and so on.

So is there a way to search the entire tag data of all of my files for a set of strings (, etc) and replace/remove this? That would fulfil my requirement to a great extent. I could probably live without the numbering of files in folders for now.

Thanks again.

You can still use the pseudo-field
%_all% for any kind of replace action.

Yet, I wouldn't do it but take the effort and check the pieces of data one by one. According to my experience does the cleaning up after such a global action take longer than checking the data after each step.

E.g.: removing from any kind of string will lead to double blanks if the search string is in the middle of the string. As this may be the case in various fields it would take you just as much time to get rid of the www stuff only this time it's the blanks.

It may lead to seemingly empty fields which yet contain one or more blanks. If the field were empty then MP3tag would have deleted them. So right now you would have to check all the files where a particular field is present but apparently has no contents.

What I would do: filter for www and then devise a suitable action for the first type of occurrence. Then refresh the filter (press F3 twice) and go on with the next.

But it is your approach and your collection, so why do I bother?

Thanks for your suggestions. I took your advice and created multiple actions to remove each fields and this seems to be working great so far - Now I have a neatly organized collection of mp3s nicely labelled and categorized. Thanks for your help with this.. Much apprecitated!

For anyone wanting to do the same, you need to create multiple actions for each tag field that you wish to remove like Title, Artist, Album, etc. You can have multiple rules within each action. For example, if you wish to remove a number of fields from the title, you need to create an action "Replace Title" and add various rules in there. I had created a regular expression to replace as suggested by ohrenkino and this worked well to remove from the titles. Some of the titles in my collection contained etc so I had to create new rules for each one. You might also want to include " -" and search for whole word only so that it removes any trailing entries from the titles. Create individual rules for each string you wish to remove and save it under "Replace Title" action. You may also want to remove any leading/trailing spaces left behind by previous actions, so it would be a good idea to include the following as well in "Replace Title" action: Action type: Format value, Field: _TITLE, Formatstring: $trim(%_title%). I also added a case conversion to title case rule to complete the look of my titles. This way, you can select all your files and click on "Replace title" action which will do all the formatting for you in one go! Repeat these steps for all other actions like Album, Artist etc and include relevant rules to remove the tag fields you wish to remove. Once the title was formatted to my liking, I also used the convert option to copy title to filename which worked great. You can also add the numbering wizard if you wish to number your tracks as 01 - filename, 02 - filename etc.

There may be an easier way of doing this but this is how I did it and it seemed to have served my purpose. Hope this helps someone :slight_smile:

The below link has a lot of info on using actions that you might find useful:


To the developers, thanks again for making this wonderful tool!