Export playlist

I have set up an action group to do these actions:
:mt_cut:
Format value "_FILENAME": %track%-%artist%-%title%
Case conversion "_FILENAME": lower case
Replace "FILENAME": " " -> ""
Replace "FILENAME": "!" -> ""
Format value "_DIRECTORY": %artist%-%album%-%year%
Replace "DIRECTORY": " " -> ""
:mt_cut:
I had also set up en export in this action group to compile a playlist of all files but when I had that in this action group it wrote it to the directory before the name change thus leaving me with two directories, one correctly named with the mp3:s and one incorrectly named with the playlist.
I'd also like the playlist named in all lower case letters if that's possible.

Help appreciated.

The export script is like this in case that makes a difference (I have no idea what I'm doing, I just trail and error it until I get the results I want).
:mt_cut:
$filename(00-%_directory%.m3u,utf-8)
$loop(%_path%)%_filename_rel%
$loopend()
:mt_cut:

Change the playlist export config so the filename is absolute:

$filename(%_folderpath%00-$lower(%_directory%).m3u,utf-8)

$loop(%_path%)%_filename_rel%
$loopend()

And you can shorten your actions:

Format value "_DIRECTORY": %artist%-%album%-%year%

Replace "DIRECTORY": " " -> ""

Can be shortened to

Format value "_DIRECTORY": $replace(%artist%-%album%-%year%, ,_)

Same thing with the _FILENAME action.

Wonderful thank you very much! :smiley:
Now I have a fully working action that does everything I want, I can even have the export command in the same action group.
I didn't shorten the replace actions though, since searching through my collection I've found lot more characters I want replaced and I don't get how to replace more than one character with your command.
Thus far I've found these characters that I want replaced: åäöé´'!
So I've added a separate replace actions for all of them.
Please don't cry. :laughing: