# Weird behaviour in Action Group

**URL:** https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628
**Category:** Mac
**Tags:** bug-fixed
**Created:** [May 9, 2024, 6:17pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628 "2024-05-09T18:17:04Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 6:17pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/1 "2024-05-09T18:17:05Z")

</div>

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? 🤔

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 9, 2024, 6:25pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/2 "2024-05-09T18:25:00Z")

</div>

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

> [@Etz](#):
>
> 24\_7 Dub Pack (Special Edition)/

to

> [@Etz](#):
>
> %ALBUMARTIST%/%ALBUM%

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.

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 6:27pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/3 "2024-05-09T18:27:04Z")

</div>

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

```auto
/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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 9, 2024, 6:32pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/4 "2024-05-09T18:32:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 6:38pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/5 "2024-05-09T18:38:38Z")

</div>

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... 🙂

```auto
./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

```

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 9, 2024, 6:46pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/6 "2024-05-09T18:46:04Z")

</div>

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%`

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 6:50pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/7 "2024-05-09T18:50:08Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 9, 2024, 6:51pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/8 "2024-05-09T18:51:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 6:53pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/9 "2024-05-09T18:53:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 9, 2024, 6:59pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/10 "2024-05-09T18:59:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 7:11pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/11 "2024-05-09T19:11:07Z")

</div>

> 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

```auto
./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:

```auto
./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.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 9, 2024, 7:23pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/12 "2024-05-09T19:23:31Z")

</div>

Which version on Mp3tag are you using on which OS?

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 7:24pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/13 "2024-05-09T19:24:34Z")

</div>

MacOS 14.4.1, (Native) Mp3Tag 1.8.21 (104)

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 9, 2024, 7:29pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/14 "2024-05-09T19:29:47Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 7:30pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/15 "2024-05-09T19:30:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 9, 2024, 7:34pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/16 "2024-05-09T19:34:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 7:38pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/17 "2024-05-09T19:38:47Z")

</div>

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](https://1drv.ms/u/s!AoGStV34PnO8mbpeGIrqVR-Sk6Hw6g?e=df3Tv2)

---

<div class="post-metadata">

### Author: ![Etz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/etz/32/7648_2.png) [@Etz](https://community.mp3tag.de/u/Etz)
#### Post date: [May 9, 2024, 7:50pm UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/18 "2024-05-09T19:50:13Z")

</div>

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 `./`

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 10, 2024, 6:41am UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/19 "2024-05-10T06:41:22Z")

</div>

I've just fixed this with [Mp3tag for Mac 1.8.22](https://community.mp3tag.de/t/mp3tag-for-mac-v1-8-released/61431/27).

Thanks for reporting and your thorough tests!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [June 9, 2024, 6:41am UTC](https://community.mp3tag.de/t/weird-behaviour-in-action-group/64628/20 "2024-06-09T06:41:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
