# exporting filename \> tag

**URL:** https://community.mp3tag.de/t/exporting-filename-tag/3759
**Category:** Support
**Created:** [September 12, 2006, 3:18pm UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759 "2006-09-12T15:18:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![datil](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@datil](https://community.mp3tag.de/u/datil)
#### Post date: [September 12, 2006, 3:18pm UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759/1 "2006-09-12T15:18:31Z")

</div>

i've seen the option "Export" in mp3tag but i don't seem to understand the format of the txt\_taglist.mte file.

i have a bunch of mp3 files with no id3 tags applied but correctly renamed in the form track-artist-title (00-artist-title.mp3), stored inside folders with the album name and the year as album-year (album-0000).

i know how to export from filename \> tag but i don't know how can i export the album name from the directory of the mp3 files so i thought this Export option was probably the correct one.

how shouuld the configuration be for exporting that?

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [September 12, 2006, 7:28pm UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759/2 "2006-09-12T19:28:45Z")

</div>

Try this (didn't test it):

```
$filename(txt)$loop(%_path%)$right(%_directory%,5)
$loopend()

```

Why dont you play with [placeholders](https://docs.mp3tag.de/format) and [scripting functions](https://docs.mp3tag.de/scripting). 😉

---

<div class="post-metadata">

### Author: ![datil](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@datil](https://community.mp3tag.de/u/datil)
#### Post date: [September 13, 2006, 6:54am UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759/3 "2006-09-13T06:54:00Z")

</div>

i still haven't tried your code but with my export settings i exported all the info to a txt file in the format album-year. this worked fine BUT some albums have "album-year\cd1", so Export command exported "cd1" instead of the album name.

how can i do it?

## -- $filename(txt)$loop(%\_path%)$if(%\_directory% = cd,%\_parent\_directory%,%\_directory%) $loopend()

doesn't seem to work but i think the idea is correct, how should i properly use the $if command? maybe that = doesn't work?

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [September 15, 2006, 3:54am UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759/4 "2006-09-15T03:54:04Z")

</div>

```
$filename(txt)$loop(%_path%)%_parent_directory%
$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:19pm UTC](https://community.mp3tag.de/t/exporting-filename-tag/3759/5 "2026-02-09T12:19:53Z")

</div>


