Multiple directories/exports in one Action


Is it possible to make one action with one directory and multiple exports in that directory ?
I tried like a hundred times i can never get it to work, all i get is two directories, one with the exports and an other one with the tracks..

What i do..

Format Value
Format String: %year% - %artist% - %title%

filename: %artist% - %title%.txt

filename: %artist% - %title%.m3u


Without rebuilding your test case ... I try a guess.

Because Mp3tag executes the action "Export" always at the end of the entire action group, ...
regardless what has happened before ...
it can be the fact, ...
that Mp3tag does not "see" or "carry on" any change in the file/folder-environment, ...
which is given in a previous step by the actual change or renaming of the current folder, done by formatting the pseudo tag-field _DIRECTORY.

You can try ...

  • Split the process into two actiongroups, and check out what happens.
  • Or ... instead of a relative filename, apply an absolute filepathname for the export file, which already contains the new directory path.


Or try something like this within the one actiongroup ...

Exports Info Filename: %YEAR%' - '%ARTIST%' - '%TITLE%'\'%ARTIST%' - '%TITLE%'.txt'


This is what i did in the end, thanks for you help!

Does it mean, that the third option, ....
which creates a more dedicated filepathname, does not work?
Did you try it?


Yes it creates a third dir

I cannot believe, ...
that a "third folder" will be created , ...
and where in the foldertree should it be located ?
You should check the actual definitions for the output filepathname within the called export scripts.
Maybe there is a naming collision between the export script and the calling action.


edit; it is working

I have created a test folder tree with files like following ...

ARTIST=Artist 1
TITLE=Title 1

ARTIST=Artist 2
TITLE=Title 2

I have created a test export script like following ...

$filename(%_directory%'\'%ARTIST%' - '%TITLE%'.txt',UTF-8) $loop(%_path%) 'Test: '%YEAR%' - '%ARTIST%' - '%TITLE%'\'%ARTIST%' - '%TITLE% 'Path: '%_path% $loopend()

I have created an actiongroup ...

#1 Action "Format value"
Formatstring: %year%' - '%artist%' - '%title%

#2 Action "Export"
Calling the export script from above.
In the Dialog "Export" I set the option "One file per directory" to 'on'.

I load both test folders into Mp3tag, selected them, and run the action.
The result was ... two renamed folders, ...
which for each contains the test media file and one newly created text file.

The procedure did work the same with a test export script like following ...

$filename('..\'%YEAR%' - '%ARTIST%' - '%TITLE%'\'%ARTIST%' - '%TITLE%'.txt',UTF-8) $loop(%_path%) 'Test: '%YEAR%' - '%ARTIST%' - '%TITLE%'\'%ARTIST%' - '%TITLE% 'Path: '%_path% $loopend()

But this $filename function does not work, when two export scripts follow each other at the end of the actiongroup.
For this case both export scripts must be start with "$filename(%_directory%'.....'".