# Easy way to get directory names above Parent?

**URL:** https://community.mp3tag.de/t/easy-way-to-get-directory-names-above-parent/9324
**Category:** General Discussion
**Created:** [November 12, 2009, 7:20pm UTC](https://community.mp3tag.de/t/easy-way-to-get-directory-names-above-parent/9324 "2009-11-12T19:20:01Z")
**Posts on this page:** 1
**Showing post:** 5

<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: [November 13, 2009, 6:28am UTC](https://community.mp3tag.de/t/easy-way-to-get-directory-names-above-parent/9324/5 "2009-11-13T06:28:15Z")

</div>

> [@tjwhale](#):
>
> ... Arggg. These long strings hurt my head.

Although Mp3tag has no concrete list oriented functions, like ItemCount or ItemExtract, there might be a trick to simulate such functionality.

"Format value" a temporary tag field e. g. MYFOLDERPATH with the value  
$replace(%\_FOLDERPATH%,'','\\')  
This should split the folder path into its components and create multiple MYFOLDERPATH tag fields in extended tag view dialog.

Using scripting function $meta(MYFOLDERPATH,N) you can fetch the Nth item from the folder path.

Using scripting function $meta(MYFOLDERPATH,$sub($folderdepth(%\_FOLDERPATH%),N)) you can fetch the Nth item (zero based) from the right side of the folder path.

After all is done you can remove the temporary tag field.

DD.20091113.0825.CET

---

_[View the full topic](https://community.mp3tag.de/t/easy-way-to-get-directory-names-above-parent/9324)._
