# Generating playlist within action-group

**URL:** https://community.mp3tag.de/t/generating-playlist-within-action-group/65320
**Category:** Support
**Created:** [July 18, 2024, 11:14am UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320 "2024-07-18T11:14:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ssx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@ssx](https://community.mp3tag.de/u/ssx)
#### Post date: [July 18, 2024, 11:14am UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/1 "2024-07-18T11:14:40Z")

</div>

Hello,  
I have a problem generating the playlist when I rename a folder within the action group.  
I execute this action group:

```auto
[#0]
T=5
1=$num(%_counter%,3)
F=TRACK

[#1]
T=5
1=%track% - %artist% - %title%
F=_FILENAME

[#2]
T=5
1=$replace(%album%,January %year%,%year%.01,February %year%,%year%.02,March %year%,%year%.03,April %year%,%year%.04,May %year%,%year%.05,June %year%,%year%.06,July %year%,%year%.07,August %year%,%year%.08,September %year%,%year%.09,October %year%,%year%.10,November %year%,%year%.11,December %year%,%year%.12)
F=ALBUM

[#3]
T=19
F=$if($eql($replace(%artist%,Various Artists,VA,Various,VA),'VA'),'VA',000.Various Artists) - %album%.m3u
1=%_folderpath%

[#4]
T=5
1=$if($eql($replace(%artist%,Various Artists,VA,Various,VA),'VA'),'VA',Various Artists) - %album%
F=_DIRECTORY

```

When generating the playlist, I get this message:  
File "D:\test\Various Artists - BIRP! October 2023\000.Various Artists - BIRP! 2023.10.m3u" cannot be created.

Could it be because I rename the folder from "Various Artists - BIRP! October 2023" to "Various Artists - BIRP! 2023.10" with action #4? If so, how can I change the action group to generate the playlist without an error message?

Thanks.

---

<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: [July 18, 2024, 12:40pm UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/2 "2024-07-18T12:40:17Z")

</div>

Actually, I do not feel like de-coding such a listing.  
Which of the actions, do you think, leads to your problem?  
And as soon as you have a suspect - does it work if you move that action to a separate action group and execute that as a last one?

Also see this description of the action to generate a playlist:

> **[Generate Playlists – Mp3tag Documentation](https://docs.mp3tag.de/actions/generate-playlists/)**
>
> Documentation on the Generate Playlists action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![ssx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@ssx](https://community.mp3tag.de/u/ssx)
#### Post date: [July 18, 2024, 2:08pm UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/3 "2024-07-18T14:08:09Z")

</div>

Thanks for the response. Are there any other ways to show or post the settings of each action here?

Each seperate action works as expected.  
I think action #4 is causing the problem. It renames the folder containing the MP3s.  
Before that, action #3 writes a playlist of the files into the folder. The folder is still named "Various Artists - BIRP! October 2023" at that point.  
Afterwards, action #4 should rename the folder to "Various Artists - BIRP! 2023.10".

I think the problem is, that action #4 renames the folder before action #3 finishes writing the .m3u playlist into the folder.  
So, It would be good if there was a function that checks if action #3 is completed before proceeding with action #4 (renaming the folder).

EDIT:  
OK. I see. That's causing the problem:  
"Generate Playlists actions are always executed after all other actions regardless of their position in the actions list. This is by design."

Thank you.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [July 18, 2024, 2:15pm UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/4 "2024-07-18T14:15:16Z")

</div>

Could [this](https://docs.mp3tag.de/actions/export/) be the problem:

> # Export
> 
> Use of Mp3tag’s [Export](https://docs.mp3tag.de/export) as an action.
> 
> Export actions are always executed after all other actions regardless of their position in the actions list. This is by design.

I assume, generating [Playlists](https://docs.mp3tag.de/actions/generate-playlists/) is some kind of export. Or I'm wrong?

---

<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: [July 18, 2024, 2:17pm UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/5 "2024-07-18T14:17:15Z")

</div>

Same thing is said about generating playlists:  
 ![grafik](https://community.mp3tag.de/uploads/default/original/3X/e/e/ee04eb6252fb31a1822c2961bdf18dda946f9d84.png)

---

<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: [August 17, 2024, 2:17pm UTC](https://community.mp3tag.de/t/generating-playlist-within-action-group/65320/6 "2024-08-17T14:17:50Z")

</div>

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