Naming Album Artist from Windows Folder name?


I open mp3tag from the folder M:\Music\flac and my music is organised like:

M:\Music\flac[album artist][album][song artist]-[title].mp3

I want the field in mp3 tag "Album Artist" to be filled with the Album Artist details (ie, the name of the folder it's stored in under the \flac level).

How do I set an action to do this - particularly when an album is listed as Various Artists ...
M:\Music\flac\Various Artists\Now 80[song artist]-[title].mp3

Help appreciated.

If it does have to be an action then use the converter "Filename - Tag" with the mask:

The converter and all action take what can be found in that level of hierarchy - so I do not understand the speciality of "Various Artists". If the folder is called "Various Artists" then exactly this will be written to the %albumartist%

Great. That does exactly what I want.

Actually, there is one flaw.

If the folder name in Windows is called Soundtracks, how do I make the Album Artist SOUNDTRACKS (in CAPS)?

use a mask that principally extracts the correct information but enclose the target field name with a function:

But then again: this converts EVERY string found at that position into caps.
If you have got the correct name in ALBUMARTIST but want it in caps, it may be much easier to apply a filter like
%albumartist% HAS soundtrack
then select all tracks
enter SOUNDTRACK in the tag panel in ALBUMARTIST
and press Ctrl-S to save the changes.

Is there a way I can make it stop after a certain place? My folder structure is music/artist/album but in some cases the album further extends with artist/album/part1 or something similar. So this leaves me with most of the albumartist tagged by the artist folder, but double discs eg have albumartist tagged by the album name. Thanks in advance for help.

you would have to set a filter to find the number of directories
I have found this advice:

"This should give you the number of artists:

no comma = one artist
one comma = two artists
two commas = three artists"

Modify it so that you count the backslashes in the path. (Sorry,have to go now).

So, back again.
Concerning the filter
"$add($len($regexp(%_path%,'[^\\]',)),1)" IS 5
Finds files with a directory-depth of 4
Vary the part of "IS 5" to the correct depth you need to rename the directories.

Aha, thank you very much :slight_smile:

Personally I find it much easier and more consistent to make sure that my folder structures are in sync with my (database type) logic as represented by my filetags.

So for example, why not capitalize your folder name to match the string you want in the tag?

And if I want all tracks to be in one album (or in separate ones) then I make sure their folder groupings match, leaving it to (perhaps custom) tag data to further differentiate within an album grouping (as with DISCNUMBER for example).

Just example/suggestions to elucidate the general principle, which I find really helps me think through my own personal tagging/organization standards in order to define them clearly.