# Tag to Filename Conversion May Fail with Escaped Literal Brackets

**URL:** <https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642>\
**Category:** Support\
**Created:** [December 28, 2021, 4:32pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642 "2021-12-28T16:32:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)\
**Post date:** [December 28, 2021, 4:32pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/1 "2021-12-28T16:32:36Z")

</div>

We know that literal brackets must be escaped with apostrophes. I am using this format:

`%artist% ['['%director%']' ](%year%) %title%[(%vocalist%)]`

This mask occasionally fails, with Mp3tag showing an error message: "The filename, directory name, or volume label syntax is incorrect". Roughly one out of ten of my M4a files will fail wth that message. But if I remove the section **['['%director%']' ]** then even those files will convert normally. So I am confident that the files themselves are OK. Can anyone spot what is wrong with my syntax or explain why it fails only with a few files?

---

<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:** [December 28, 2021, 4:47pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/2 "2021-12-28T16:47:53Z")

</div>

> [@Doug\_Mackie](#):
>
> %artist% '['%director%']' %title%[(%vocalist%)]

Could you show the preview of such a failing file?  
(I just tried a similar mask, though with GENRE and COMPOSER instead of DIRECTOR and VOCALIST, and 96 files and none produced an error. So I assume it is a character in the name or something.)

---

<div class="post-metadata">

**Author:** ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)\
**Post date:** [December 28, 2021, 5:56pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/3 "2021-12-28T17:56:15Z")

</div>

Ohrenkino, here is a paste from Preview for two files that fail:

"E:\Music\DOWNLOADS\British Bands\TEST\Banking On The Weather - The Masqueraders (Savoy Hotel Orpheans) - Columbia CB 490.m4a" -\>  
"E:\Music\DOWNLOADS\British Bands\TEST\The Masqueraders [Carroll Gibbons] (1932) Banking on the Weather (Les Allen).m4a"

"E:\Music\DOWNLOADS\British Bands\TEST\What Makes You So Adorable - Savoy Hotel Orpheans - Columbia CB 469.m4a" -\>  
"E:\Music\DOWNLOADS\British Bands\TEST\The Savoy Hotel Orpheans [Carroll Gibbons] (1932) What Makes You So Adorable (Al Bowlly).m4a"

![Tag-FilenameScreenShot](https://community.mp3tag.de/uploads/default/original/2X/e/ed09fa527eb348b72b254d05e310714b96dfe25d.jpeg)

![Tag-FilenameErrorMsg](https://community.mp3tag.de/uploads/default/original/2X/e/e056381217a50a3ad987b4e82246acdfe1ac8d62.jpeg)

Thanks for your interest!

---

<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:** [December 28, 2021, 6:17pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/4 "2021-12-28T18:17:00Z")

</div>

This is the output from my preview:

```auto
"C:\Music\DOWNLOADS\British bands\TEST\Banking On The Weather - The Masqueraders (Savoy Hotel Orpheans) - Columbia CB 490.mp3" ->
"C:\Music\DOWNLOADS\British bands\TEST\The Savoy Hotel Orpheans [Carroll Gibbons] (1998) Banking on the Weather (Ambient).mp3"

"C:\Music\DOWNLOADS\British bands\TEST\What Makes You So Adorable - Savoy Hotel Orpheans - Columbia CB 469.mp3" ->
"C:\Music\DOWNLOADS\British bands\TEST\The Savoy Hotel Orpheans [Carroll Gibbons] (1998) What Makes You So Adorable (Ambient).mp3"

```

So it works over here ...  
As I used COMPOSER and GENRE (as said before) it could be that you have to check whether you have strange characters in the data, e.g. a line break or something like that.

---

<div class="post-metadata">

**Author:** ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)\
**Post date:** [December 28, 2021, 7:07pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/5 "2021-12-28T19:07:32Z")

</div>

> [@ohrenkino](#):
>
> ... it could be that you have to check whether you have strange characters in the data, e.g. a line break or something like that.

At first I was sceptical because, as I said earlier, removing the **['['%director%']' ]** section allows the files to convert. So by your logic the bad character could only be in the %director% tags, which are simply names. So I cleared these names in the two test files. Then I carefully typed the same text back in and... the files converted! I recall pasting the director names from Comments tags and some invisible garbage must have crept in.

Thank you very much, ohrenkino!

---

<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:29pm UTC](https://community.mp3tag.de/t/tag-to-filename-conversion-may-fail-with-escaped-literal-brackets/55642/6 "2026-02-09T12:29:35Z")

</div>


