# Help with Export

**URL:** <https://community.mp3tag.de/t/help-with-export/19021>\
**Category:** Support\
**Created:** [June 2, 2017, 4:34pm UTC](https://community.mp3tag.de/t/help-with-export/19021 "2017-06-02T16:34:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raphion](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@Raphion](https://community.mp3tag.de/u/Raphion)\
**Post date:** [June 2, 2017, 4:34pm UTC](https://community.mp3tag.de/t/help-with-export/19021/1 "2017-06-02T16:34:41Z")

</div>

In [THIS](https://community.mp3tag.de/t/19002/3) thread I receive help from **ohrenkino** and that script with two loops served me well until now.

The problem is that when I try to export from multiple folders at once, if some of the albums folder have sub-folders numbering the discs, the result that is written on the TXT file is just the name of that sub-folder. Some similar to this:

```
CD 1
track1
track2
track3 

CD 2
track1
track2
track3

```

Another problem with the actual script is that when two albums folders have exactly the same sub-folder name (example: both have a Disc 1 sub-folder) the export result ignore the Disc 1 folder of the second one and just proceed writing the sub-folders with different numbers that do not exist on the first folder. I mean, suppose that 2 album folders have this structure:  
Album A have "Disc 1" and "Disc 2" sub-folders.  
Album B have "Disc 1", "Disc 2" and "Disc 3" sub-folders.  
Using the actual script the TXT will have the tracks from the "Disc 1" and "Disc 2" sub-folders from Album A listed, but no from the Album B, Album B will only have the tracks listed starting from "Disc 3".

I'm searching for something that result on something similar to this:

```
Album Name
CD 1
track1
track2
track3 

CD 2
track1
track2
track3

```

Anyone can give some advice or a answer to improve the previous script making it able to supply this need?

Thanks in advance for all help provided.

---

<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:** [June 2, 2017, 6:24pm UTC](https://community.mp3tag.de/t/help-with-export/19021/2 "2017-06-02T18:24:25Z")

</div>

Can't you filter for those albums that have the CD in the folder name?

Then you could add another loop on the \_parentdirectory

$filename(txt,utf-8)$loop(%\_parentdirectory%)%album%$loop(%\_directory%)%\_directory%  
$loop(%\_filename%)%\_filename%  
$loopend()  
$loopend()$loopend()

---

<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:26pm UTC](https://community.mp3tag.de/t/help-with-export/19021/3 "2026-02-09T12:26:50Z")

</div>


