Check If All Specified Tags Exist Before Doing Action

How do I make Mp3tag check if tags exists before executing action. I know how to make it check for a single tag but I need it to check for multiple tags and only execute if it contains all of them.

A few days ago there was a similar theme ...
Quicker Filter Options

Please explain what you want to achieve in special, ...
because it is not needed always to check all circumstances before doing something in Mp3tag, ...
but there might come up some procedure, where pre-checking is advisable.


When I run actions to rename files, I don't want the file names changed unless all the tags I specify exist.

Edit: That thread is talking about filters. I need to be able to use it in a formatting string.

You can use the Mp3tag filter section for testing and training, ...
then mimic the filter expression into formatstring to be used within action.

Check if one tag-field exists ...

Check if two tag-fields exists ...

Check if three tag-fields exists ...

Check if TITLE tag exists together with TRACK or TOTALTRACKS ...


That's what I don't know how to do.

Format Value
Format String
$if(%albumartist%,%albumartist% - %track% - %title%,%_filename%)

This string checks if the %albumartist% tag is there and if it is it renames the file to %albumartits% - %track% - %title%.flac and if the %albumartist% tag is there it leaves the name the same. Thats all good but if the %track% or %title% is missing, the the file name will be messed up.
$if(%albumartist%,%albumartist% - %track% - %title%,%_filename%)

How do I make this check check or %albumartist% and %title% before doing the action?

Why start actions on files that apparently do not fulfill the requirements?
Renaming would be a little faster if only those files are treated that should be treated.
If you want to avoid that empty fields (that don't exist) find their way into filenames, use the square brackets around these variables. This creates the part only, if there is a value in that variable, e.g.
%artist%[ _ %composer%] _ %title%
adds the composer part only if composer is filled.

It's not that I'm intending to run the actions on the files that don't have the tags. It's a way to prevent it from happening accidentally. Based on the suggestions I've got so far, I assume it's not possible to do what I want. I appreciate the help but my initial inquiry was not answered. I have very specific wants/needs and I would just like to know how to do exactly what I asked about. If isn't possible or if you don't know how too just say that. I'll find another way do it or just not worry about it.

Again, thanks for the suggestions. I will add the brackets in to my strings so that blank fields don't get written if I can't figure out a way to do what I want.

Thanks, it works.