Filenames with double spacing issues

I use Convert > Tag- Filename. My preferred format string is %artist% - %album% - %title% because those fields are most relevant to me when identifying a file, or searching for it by artist/album without relying on directories. I don't use 'track' because it's only useful for sorting songs by album order in a directory, and I'd rather have media player software doing that function.

I separate fields using " - " because it's easier to read than "-". Underscores are fine, but a bit harder to read, and "-" is overkill.

Anyway, this would be fine if all files had an artist, album and title field. In reality however, I get left with filenames like "artist - - title" and " - - title". This is a problem for me because the blank/empty spaces and dashes/hyphens aren't useful (unless you don't want to confuse an artist for an album).

Here's my solution:

Action #1
Actiontype 2: Replace
Field ______: _FILENAME
Original ___: - -
Replace with: -

[_] Only as whole word [_] Case sensitive comparison

Before: " - album - title.mp3" (no artist)
After: " - album - title.mp3"

Before: "artist - - title.mp3" (no album)
After: "artist - title.mp3"

Before: " - - title.mp3" (no artist & album)
After: " - title.mp3"

Better, but there is still unwanted spaces and dashes when the artist field is missing. The next action fixes that.

Action #2
Actiontype 2: Regular Expression
Field ______: _FILENAME
Original ___: ^ -
Replace with:

[_] Only as whole word [_] Case sensitive comparison

Before: " - album - title.mp3"
After: "album - title.mp3"

Before: " - title.mp3"
After: "title.mp3"

If all fields are blank, there will still be " - - .mp3" files, but that is not an issue for me because all songs at least have a title.

I hope that helps someone like me who couldn't find an answer.

Do you know the feature of the converter to leave out definitions that would to empty strings?

If your mask looked like this:
[%artist% - ][%album% - ][%title%]
then you would get only those parts that actually have contents. THis would then avoid to apply the actions afterwards.

In general I would apply filters that check for
%artist% IS "" OR %album% IS ""
first to make sure that you get complete filenames because you then can fill in the missing parts.

I didn't know about that. It looks much more efficient. When I was looking for a solution earlier, I think I did see something about that, but thought it didn't work when I (incorrectly) tried to use it.

Disregard my method then :stuck_out_tongue:

Useful filter, but I have a lot of unknown artist/album files so 'complete' filenames aren't an option.