# \_DIRECTORY formatting issue with non alphanumeric characters

**URL:** https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754
**Category:** Support
**Created:** [February 12, 2018, 9:42am UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754 "2018-02-12T09:42:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![marcusj0015](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@marcusj0015](https://community.mp3tag.de/u/marcusj0015)
#### Post date: [February 12, 2018, 9:42am UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/1 "2018-02-12T09:42:48Z")

</div>

I have an action to place songs in the %artist%%album% folder, and it works ok for alphanumeric characters (lower and upper case and numbers) but not special characters like `$` let alone Unicode.

Here's my action:

Format value: Field =\_DIRECTORY Format string = `E:\Media\Music\%artist%\%album%`

I've tried it both with and without a trailing slash at the end of the format string, and it doesn't affect it at all.

Try it yourself, Put A$ap Rocky or $uicideBoy$ in the artist field then apply the action, it won't work.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [February 12, 2018, 10:18am UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/2 "2018-02-12T10:18:18Z")

</div>

> [@marcusj0015](#):
>
> Format value: Field =\_DIRECTORY Format string = E:\Media\Music%artist%%album%

Are you on Windows or macOS?

Besides that, it looks like a backslash is missing between the fixed and variable parts of the format string. Can you try with  
`E:\Media\Music\%artist%%album%`

---

<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: [February 12, 2018, 10:19am UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/3 "2018-02-12T10:19:26Z")

</div>

apparently, you have to use the $validate() function

> [@marcusj0015](#):
>
> Format value: Field =\_DIRECTORY Format string = E:\Media\Music%artist%%album%

should be  
Format string = $validate(E:\Media\Music%artist%%album%,\_)

---

<div class="post-metadata">

### Author: ![marcusj0015](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@marcusj0015](https://community.mp3tag.de/u/marcusj0015)
#### Post date: [February 12, 2018, 6:08pm UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/4 "2018-02-12T18:08:10Z")

</div>

No, there's no backslash missing between Music and the variables, I just did a typo on accident when I copied it here.

In fact, I didn't even make a typo, your forum software ate that slash.

---

<div class="post-metadata">

### Author: ![marcusj0015](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@marcusj0015](https://community.mp3tag.de/u/marcusj0015)
#### Post date: [February 12, 2018, 11:12pm UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/5 "2018-02-12T23:12:17Z")

</div>

Thanks for this, I didn't know about the validate function.

---

<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:27pm UTC](https://community.mp3tag.de/t/directory-formatting-issue-with-non-alphanumeric-characters/40754/6 "2026-02-09T12:27:14Z")

</div>


