Sorting into folders

Hello!
Maybe someone can suggest a solution for me for my following issue.
Actually I organize my files (after correcting the tags) with an MP3tag action.
The action looks like this:
Field: _Filename
Format: /Volumes/XXX/XXX/%ALBUMARTIST%/%album%/%_filename%

This works pretty good, but if the "Albumartist" field is unpopulated the files are stored under Album/filename.
Is there a way to autopopulate the Albumartist field in case it is empty?

Any suggestions are welcome.

You could use square brackets to enclose the [%ALBUMARTIST%] part. This would only use it if this tag has some content in it. Don't forget to use the correct Slash or Backslash, depending on your OS.

See the help: Format Strings and Placeholders – Mp3tag Documentation

If you want to fill/autopopulate %ALBUMARTIST%, you have to use another action to use the content from - let's say ARTIST - first.

Thank you for your fast answer.
Is it possible to autopopulate the Albumartist field with an action only when the field is empty?

I would solve it like this:
1.) Add a new column called ALBUMARTIST (if it not already exists)
2.) Load all your files
3.) Sort by clicking on the column ALBUMARTIST
4.) Select all the files without content in ALBUMARTIST
5.) Execute your action to fill ALBUMARTIST with whatever content you like

Another way would be to use the filter with F3 and
albumartist MISSING
followed by the above steps 4 to 5.

From the help: Filter and Search – Mp3tag Documentation

You could use $if2(%albumartist%,%artist%) which uses the ALBUMARTIST when it is there or when missing then the alternative string - in my suggestion the contents from ARTIST. Instead of %artist% you could also use a string constant like "Various artists" or any other combination.

Looking at your string with

... are you using the Mac version?

yes, I am using the mac version (and i'm missing desperatly the scripting, especially for beatport tagging)

then, next time, please use the Mac section of the forum for your threads.
I moved this topic now.
And please don't mix topics esp. if there is already a thread with that topic:

The results of "$if2(%albumartist%,%artist%) are promising but what i actually dont get is the usage of a string constant like "Various artists". For example when I have a Album with tracks from various artists where every track is tagged correct but the field "Album artist" is empty... these tracks should stay together in a single folder which has only the name of the album. Is that even possible with one action?

You can die only one death.
Either you want to set a string constant or you auto-fill the missing ALBUMARTIST with ARTIST (or something from a format string).
In a single action/converter, you would have to insert a lengthy condition (of which I would not know what it would be as MP3tag does not compare the data between files).
Or you simply decide that all missing ALBUMARTIST track become "Various Artists" and the condition would be $if2(%albumartist%,Various Artists).
All files without ALBUMARTIST are then summarized under the pseudo-album artist "Various Artists".
If that is not the way you want it, then you may go the other way and fill the ALBUMARTIST with special pseudo-album artists like "Sampler Ambient", "Café del Mar" and so on.

1 Like

This is one of the main reasons the AlbumArtist field exists. When a compilation album has many different artists by track, there is no common string to tie that album together. So using one such as "Various Artists" (most common), or "Compilation", or some other term of your preference is the key to keeping these albums assembled together not only in a file structure but also most media player library browsers.

Use the filter suggested above by @LyricsLover to find any files that are missing this field, and then fill them with the term you choose. Then your original action will work as expected.