# \_parent\_directory Placeholder for naming export configurations

**URL:** https://community.mp3tag.de/t/parent-directory-placeholder-for-naming-export-configurations/9512
**Category:** Export
**Created:** [December 10, 2009, 1:38pm UTC](https://community.mp3tag.de/t/parent-directory-placeholder-for-naming-export-configurations/9512 "2009-12-10T13:38:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dug](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@dug](https://community.mp3tag.de/u/dug)
#### Post date: [December 10, 2009, 1:38pm UTC](https://community.mp3tag.de/t/parent-directory-placeholder-for-naming-export-configurations/9512/1 "2009-12-10T13:38:50Z")

</div>

Hello.

I am trying to set a placeholder to automatically name my export files, but I've hit a hiccup:

I organize my music, which is mostly live shows, in directories following this structure: **BAND/YEAR/SHOWS/TRACKS.mp3**  
   
So, I'm fine with $filename( **%\_parent\_directory%**.all-shows.mp3tag.html) when I'm doing things by **YEAR** and the path where I begin the export from is **YEAR/SHOWS/TRACKS.mp3**

... this spits out a filename like **1983 - formatted and shnid.all-shows.mp3tag.html** for everything in the 1983 **YEAR** directory. This is all good.

But when I go up one more directory and try to begin the export at the **BAND** directory level, the name of my export file is the same as when I begin at the **YEAR** directory level: **1983 - formatted and shnid.all-shows.mp3tag.html**. The export has built the file to include all my track/show info for all my **YEAR** directories (1983-2009) as it should, but appears to take the name from the first **YEAR** directory in the chain rather than taking it from the higher **BAND** directory level.

What placeholder would I use to make the export config read up one more directory to the **BAND** level?

THANKS in advance! (And hope that all makes sense!)

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [December 10, 2009, 5:04pm UTC](https://community.mp3tag.de/t/parent-directory-placeholder-for-naming-export-configurations/9512/2 "2009-12-10T17:04:46Z")

</div>

What about %\_workingdir% ?

---

<div class="post-metadata">

### Author: ![dug](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@dug](https://community.mp3tag.de/u/dug)
#### Post date: [December 10, 2009, 5:54pm UTC](https://community.mp3tag.de/t/parent-directory-placeholder-for-naming-export-configurations/9512/3 "2009-12-10T17:54:15Z")

</div>

HA! Well, I coulda sworn I tried using %\_workingdir%, but what it was giving me when I tried it was just using the name of the first **SHOWS** directory it read, ignoring the **BAND/YEAR** directories above it ...

But, I just tried that again and it worked perfectly!

Thanks Dano!
