# Multiple directories/exports in one Action

**URL:** <https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050>\
**Category:** Support\
**Created:** [July 13, 2015, 12:22pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050 "2015-07-13T12:22:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tool](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tool](https://community.mp3tag.de/u/tool)\
**Post date:** [July 13, 2015, 12:22pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/1 "2015-07-13T12:22:09Z")

</div>

Hello,

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

Action  
Format Value  
Field : \_DIRECTORY  
Format String: %year% - %artist% - %title%

Exports  
Info  
filename: %artist% - %title%.txt

Exports  
Playlist  
filename: %artist% - %title%.m3u

Thanks

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 13, 2015, 1:18pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/2 "2015-07-13T13:18:42Z")

</div>

> [@tool](#):
>
> Hello, 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. ...

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.

DD.20150713.1718.CEST

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

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

DD.20150713.1859.CEST

---

<div class="post-metadata">

**Author:** ![tool](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tool](https://community.mp3tag.de/u/tool)\
**Post date:** [July 16, 2015, 11:06am UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/3 "2015-07-16T11:06:32Z")

</div>

> [@DetlevD](#):
>
> You can try ...
> 
> - Split the process into two actiongroups, and check out what happens.

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

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 16, 2015, 11:38am UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/4 "2015-07-16T11:38:12Z")

</div>

> [@tool](#):
>
> 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?

DD.20150716.1538.CEST

---

<div class="post-metadata">

**Author:** ![tool](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tool](https://community.mp3tag.de/u/tool)\
**Post date:** [July 16, 2015, 3:31pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/5 "2015-07-16T15:31:38Z")

</div>

> [@DetlevD](#):
>
> Does it mean, that the third option, ....  
> which creates a more dedicated filepathname, does not work?  
> Did you try it?
> 
> DD.20150716.1538.CEST

Yes it creates a third dir

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 16, 2015, 3:55pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/6 "2015-07-16T15:55:30Z")

</div>

> [@tool](#):
>
> 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.

DD.20150716.1955.CEST

---

<div class="post-metadata">

**Author:** ![tool](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tool](https://community.mp3tag.de/u/tool)\
**Post date:** [July 16, 2015, 7:31pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/7 "2015-07-16T19:31:00Z")

</div>

edit; it is working

---

<div class="post-metadata">

**Author:** ![tool](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tool](https://community.mp3tag.de/u/tool)\
**Post date:** [July 17, 2015, 9:11am UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/8 "2015-07-17T09:11:31Z")

</div>

-

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 18, 2015, 7:35am UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/9 "2015-07-18T07:35:55Z")

</div>

> [@tool](#):
>
> ... Is it possible to make one action with one directory and multiple exports in that directory ? ...

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

\Test\Testfolder1\Test.Export.1.mp3  
ARTIST=Artist 1  
TITLE=Title 1  
YEAR=2014

\Test\Testfolder2\Test.Export.2.mp3  
ARTIST=Artist 2  
TITLE=Title 2  
YEAR=2015

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"  
Field : \_DIRECTORY  
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%'.....'".

DD.20150718.1205.CEST

---

<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:** [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/multiple-directories-exports-in-one-action/17050/10 "2026-02-09T12:25:46Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


