Weird behaviour in Action Group

I am observing I weird behaviour on action group which I cannot explain in any ways, so maybe someone from this forum has an explanation.

So, Action Group has 2 Actions, format tag field:

  1. _FILENAME -> %DISCNUMBER%$num(%TRACK%,2) %TITLE%
  2. _DIRECTORY -> %ALBUMARTIST%/%ALBUM%

Order in which they are in action group does not change behaviour, but this is what happens.
First path becomes (desired behaviour):

/Users/%username%/Testing/Compilations/Various Artists/24_7 Dub Pack (Special Edition)/01 Radio Hardcore Porn.mp3

All other file paths change to (weird behaviour):
/Users/%username%/Testing/Compilations/Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/02 Badgertism.mp3

Which is super weird, basically %ALBUMARTIST% is inserted twice?
Same happens, when I reverse order of those actions, at the same time both actions work correctly, if they are in separate action groups.

So it only works as desired, for some reason, for first file in specific folder.
What I am missing here? :thinking:

I assume that you have "Various Artists" as ALBUMARTIST?
If you rename the _DIRECTORY

to

then you get Various Artists\24_7 Dub Pack (Special Edition)
The other "Various Artists" is not part of the current directory but of the parent directory.

I forgot to add, starting path for those files in example is:

/Users/%username%/Testing/Compilations/Various Artists - 24-7 Dub Pack (Special Edition)/01 - Alaguan - Radio Hardcore Porn.mp3
/Users/%username%/Testing/Compilations/Various Artists - 24-7 Dub Pack (Special Edition)/02 - Rob IYF & Al Storm - Badgertism.mp3

The other "Various Artists" is not part of the current directory but of the parent directory

There is no such parent directory, before action group runs.
And it does not explain, why it works, when I remove _FILENAME action from that group.
Then _DIRECTORY action works fine, for every file and does not spawn %ALBUMARTIST% twice.

So, there are 2 files that get treated in this example?
If you had 3 files in this folder, you would get "V.A" 3x.

Actually it is 70 files, 2 directories (albums) I am playing around with.
But same happens for both, first folder has 13 files, first one gets treated as you would expect, all 12 other 12 have behaviour as second file in my posted example.
Same happens to second directory (album), first file gets treated as expected all other 56 have behaviour as second file in my posted example. For second folder it is not Various Artists, but specific Artist which is same as Album Artist.

Increasing decreasing amount of sample albums or files does not change this behaviour.
Only thing that does, is removing _FILENAME action, but I definitely don't have %ALBUMARTIST% tagged into %DISCNUMBER%, %TRACK% or somewhere else, except correct field.

If you had 3 files in this folder, you would get "V.A" 3x.

No I don't... :slight_smile:

./Various Artists/24_7 Dub Pack (Special Edition)/01 Radio Hardcore Porn.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/12 Temple Of Beans.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/07 Come With Mooooo.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/13 Gravy Baby Negative.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/02 Badgertism.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/08 Runaway 2 Mars Brah.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/03 For The Light.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/09 Tent-Tation (Only Tents Mix).mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/06 I'm Mauve.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/05 What.. Where Did You Go Bruv.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/04 Scary Man-Stars.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/11 Left Beside You.mp3
./Various Artists/Various Artists/24_7 Dub Pack (Special Edition)/10 Oh Hello!.mp3

If you want to keep an certain depth of folders, use an absolute path, e.g.
Format value for _DIRECTORY
Format string: F:\Testing/Compilations\%albumartist%\%album%

Unfortunately it defeats a purpose to have an action in a first place, and still it does not explain why it happens.

If you had 3 files in this folder, you would get "V.A" 3x.

Even having it behave recursively, would make sense, but it does not behave that way.
What I don't understand is why it works, when _FILENAME action is removed from group,
while at the same time, order of those 2 actions in group does not change result.

AFAIK any action that deals with the folder is executed last, irrespective of the position in the action group.

OK, fine...but _FILENAME action should not affect it's behaviour,
since that action does not have / hence it does not alter the _DIRECTORY in any way.
That is basically the part I fail to understand...
But what I do see, is that it is somehow still related according to my testing.

For testing purposes you could modify the _DIRECTORY action to set as format string: %_directory% - which should not change the folder.
So if the action for _FILENAME is the culprit, this should prove it.

If the action for _FILENAME is OK, test it the other way round: keep the filename and modify the folder.

For testing purposes you could modify the _DIRECTORY action to set as format string: %_directory% - which should not change the folder.
So if the action for _FILENAME is the culprit, this should prove it.

If the action for _FILENAME is OK, test it the other way round: keep the filename and modify the folder.

Actually wait a minute...will retest.

EDIT: Verified, indeed, in both occasions result is desired for all files.

Preserve _DIRECTORY

./Various Artists - 24-7 Dub Pack (Special Edition)/12 Temple Of Beans.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/07 Come With Mooooo.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/13 Gravy Baby Negative.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/02 Badgertism.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/08 Runaway 2 Mars Brah.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/03 For The Light.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/09 Tent-Tation (Only Tents Mix).mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/06 I'm Mauve.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/01 Radio Hardcore Porn.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/05 What.. Where Did You Go Bruv.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/04 Scary Man-Stars.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/11 Left Beside You.mp3
./Various Artists - 24-7 Dub Pack (Special Edition)/10 Oh Hello!.mp3

Preserve _FILENAME:

./Various Artists/24_7 Dub Pack (Special Edition)/11 - Eazyvibe - Left Beside You.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/06 - Rob IYF - I'm Mauve.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/13 - Al Storm - Gravy Baby Negative.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/02 - Rob IYF & Al Storm - Badgertism.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/09 - Darren Tyler - Tent-Tation (Only Tents Mix).mp3
./Various Artists/24_7 Dub Pack (Special Edition)/08 - Rob IYF & DJ GTA - Runaway 2 Mars Brah.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/04 - Eufeion - Scary Man-Stars.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/03 - Eufeion - For The Light.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/12 - Rob IYF & DJ GTA - Temple Of Beans.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/01 - Alaguan - Radio Hardcore Porn.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/10 - Rob IYF & 4D - Oh Hello!.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/07 - Alaguan - Come With Mooooo.mp3
./Various Artists/24_7 Dub Pack (Special Edition)/05 - Eazyvibe - What.. Where Did You Go Bruv.mp3

As I said, applying those actions separately works.
EDIT: I hate copy pasting, managed to paste some previous crap, over and over again.

Which version on Mp3tag are you using on which OS?

MacOS 14.4.1, (Native) Mp3Tag 1.8.21 (104)

OK, it's always helpful to mention this when reporting weird behavior.

I'm moving this to Mac and will look into this.

Sure, thanks...but I somehow considered to be a bug in my understanding, not in Mp3Tag :smiley:

Given from your example, it should work as you've expected it to work.

The current folder
/Various Artists - 24-7 Dub Pack (Special Edition)/ should be renamed to
/Various Artists/24_7 Dub Pack (Special Edition)/ and all the files within it.

This is what I am kind of after, yes.
But for some reason, it only works for the first file in subfolder.

Here is my "test suite": Testing.zip

Actually I found a way, when it works.
Basically, if I do this instead:

  1. _FILENAME -> %DISCNUMBER%$num(%TRACK%,2) %TITLE%
  2. _DIRECTORY -> ../%ALBUMARTIST%/%ALBUM%

It also limits the recursion so if I run action group 3 times, it does not spawn:
/Various Artists/Various Artists/Various Artists/
But it moves everything one level up, as expected

Doing:
2. _DIRECTORY -> ./%ALBUMARTIST%/%ALBUM%
Has same result, as without ./

I've just fixed this with Mp3tag for Mac 1.8.22.

Thanks for reporting and your thorough tests!