Tag to filename - IF filename already exists, then retry with

Say I have two different variants of a song within one folder (same title and same artist) and format the filename as "%title% - %artist%". That will throw an error for the 2nd variant because the filename already exists on the first one.

Would it be possible to add an IF function to the action, so that if this error occurs it retries with additional " (%album%)" in the string? Or is that beyond Mp3tag capabilities.

This happens so rarely that I can do it manually when it occurs, I'm more just curious if that could be done somehow. :slight_smile:

This is currently not possible, because every track is handled on its own. There is no check what the track before or the track after will build as its file name.

If it happens rarely, I would activate the "at warnings from Actions" in File -> Options -> Messages and handle this rare cases as you like.

When you say 2 different variants of a song, what is the difference between them? Is (for example) the 2nd song an instrumental version of the first song, a cover, remix, or something of the like? Then the %title% field could/should have that information as well in order to differentiate them.

Or are they 2 copies of the same music file that you intend to screen out to sanitize your library?

Figured as much, thanks for confirming.

the %title% field could/should have that information as well in order to differentiate them.

Yeah that's an obvious workaround, but given how rare it is I'm not giving up my tag consistency for it - all differentiating information is included in other tags so I can tell them apart. It's just that the filenaming action can't handle it alone and I gotta differentiate that bit manually.

what is the difference between them?

It's usually either different unnamed mix from a different year, an unreleased song (i.e. no title/artist), or the whole release line is nameless.

But it's really like 1 in 2000 files "issue", so it's fine to handle manually. As I said I was just curious how far Mp3tag capabilities go :slight_smile: No biggie

I've hit that same bump before (hence my interest in this topic) in terms of file naming consistency.
Since my media player of choice is foobar2000, I can search/structure/manage my library just as easily by tags or by filename. Eventually, I found little reason to keep using a human readable structure in my filenaming convention, so currently I use a system that assigns a unique id to each file, and basically have all my collection in 2 folders: catalogued and not-catalogued.

And almost never open those folders 'manually'.

If the differentiating information is present in other tags, whats stopping you from using those tags to set up an action?