# Exporting - RegEx Folder Question

**URL:** https://community.mp3tag.de/t/exporting-regex-folder-question/9831
**Category:** Support
**Created:** [February 5, 2010, 8:44pm UTC](https://community.mp3tag.de/t/exporting-regex-folder-question/9831 "2010-02-05T20:44:33Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![djatwork](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djatwork/32/5560_2.png) [@djatwork](https://community.mp3tag.de/u/djatwork)
#### Post date: [February 5, 2010, 8:44pm UTC](https://community.mp3tag.de/t/exporting-regex-folder-question/9831/1 "2010-02-05T20:44:33Z")

</div>

Hello all. I was hoping to get some help with a regex question. When I do an export action and use **%\_folderpath%** , I get:

> F:\music\Blues\Albert King\1967-Born Under a Bad Sign\

explained:

> DRIVE:\notImportant\Genre\Artist\AlbumYear-AlbumName\

What I am trying to get, is the Artist folder name from that string above.

So, something like $right(%\_folderpath%, -2), that should produce just \Albert King  
I just don't know how to traverse the directory, starting from the right, back 2 levels

Also, I can't use the %artist%, because windows machines don't allow **/?\*"\<\>|:** in directory names; but those characters might be in my Artist Name 🙂

Thanks!  
Drew

---

_[View the full topic](https://community.mp3tag.de/t/exporting-regex-folder-question/9831)._
