# Tag - Filename conversion breaks with single/double backslash

**URL:** https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140
**Category:** Support
**Created:** [August 7, 2022, 8:05pm UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140 "2022-08-07T20:05:20Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Prism1200](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@Prism1200](https://community.mp3tag.de/u/Prism1200)
#### Post date: [August 7, 2022, 8:05pm UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/1 "2022-08-07T20:05:20Z")

</div>

Environment: Windows 11 22000.795, Mp3tag v3.17 32-bit

Title: `I still think about y%#'()_*{\\""'&36)%(""'$&''&(15y!!!_??*`~`

Format string: `%title`, `$validate(%title%,)`

Expected behavior: Removing illegal characters.  
`I still think about y%#'()_{'&36)%('$&''&(15y!!!_`~`

Actual behavior: Truncating all starting right before double backslash.  
`I still think about y%#'()_{`

++  
Changing double backslash to single backslash:  
`I still think about y%#'()_*{\""'&36)%(""'$&''&(15y!!!_??*`~`

Format string: `%title`, `$validate(%title%,)`

Actual behavior: Backslash doesn't get removed in preview,  
`I still think about y%#'()_{\'&36)%('$&''&(15y!!!_`~`  
and creating folder `I still think about y%#'()_{` with filename `'&36)%('$&''&(15y!!!_`~.flac`

---

<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: [August 7, 2022, 8:48pm UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/2 "2022-08-07T20:48:12Z")

</div>

See here:

> [@\[X\] possible mishandling of backslashes in tags](https://community.mp3tag.de/t/x-possible-mishandling-of-backslashes-in-tags/8822):
>
> Problem description: "Tags to filename" function creates folders when tags contain a \ (backslash) Example: artist: yyy title: zzz\zzz Using the "tag to filename" option with a "%artist%-%title%" format-string - I'd expect the resulting file to be named "yyy-zzz\zzz.mp3" Due to restrictions in the file system, this filename is impossible to create. the "yyy-zzz" part will always be interpreted as a folder containing a file called "zzz.mp3". As a result, instead of renaming the file, the …

and the documentation:

> **[Rename Files – Mp3tag Documentation](https://docs.mp3tag.de/converters/rename-files/)**
>
> Documentation on Tag to Filename, a converter to rename files based on tags. Mp3tag is the universal Tag Editor.

The backslash is no invalid character that has to be removed.

What you call

> [@Prism1200](#):
>
> Expected behavior: Removing illegal characters.

is fulfilled - in accordance with the documenation.  
No bug.

---

<div class="post-metadata">

### Author: ![Prism1200](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@Prism1200](https://community.mp3tag.de/u/Prism1200)
#### Post date: [August 7, 2022, 9:19pm UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/3 "2022-08-07T21:19:50Z")

</div>

Thank you for information. However even with $replace, text after double backslash `\\` is removed.  
`test\\1234` -\> `test`  
`test\1234` -\> `test_1234`

---

<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: [August 8, 2022, 5:42am UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/4 "2022-08-08T05:42:04Z")

</div>

> [@Prism1200](#):
>
> text after double backslash

could you show an example?  
Generally, MP3tag displays multi-value fields with a double backslash.  
CHeck the extended tags dialogue Alt-T to see that you have several fields of the same type.  
To merge such fields, you need the $meta() functions, where you preferably set a different separator than the double backslash.

---

<div class="post-metadata">

### Author: ![Prism1200](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@Prism1200](https://community.mp3tag.de/u/Prism1200)
#### Post date: [August 8, 2022, 6:36am UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/5 "2022-08-08T06:36:52Z")

</div>

More like edge case; the title itself contains double backslash.  
From first post: Title is `I still think about y%#'()_*{\\""'&36)%(""'$&''&(15y!!!_??*`~`  
For testing, set title to `test\\1234`, `$replace(%title%,\,_)` or just `%title%` shows `test` only

---

<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: [August 8, 2022, 7:11am UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/6 "2022-08-08T07:11:57Z")

</div>

> [@Prism1200](#):
>
> For testing, set title to `test\\1234`, `$replace(%title%,\,_)` or just `%title%` shows `test` only

As soon as you enter data with a double backslash and save that modification you create a multi-value field.  
So check the extended tags dialogue - you should have now 2 fields of the type TITLE, one with "test", the other one with "1234".

In windows, empty folder names are not allowed - a double backslash would create such an empty folder name.

---

<div class="post-metadata">

### Author: ![Prism1200](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@Prism1200](https://community.mp3tag.de/u/Prism1200)
#### Post date: [August 8, 2022, 7:49am UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/7 "2022-08-08T07:49:42Z")

</div>

Didn't know that double backslash works as seperator.. that makes sense. That's intended and no way to disable or get around right? I'll have to use other software for the file. Thank you.

---

<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: [August 8, 2022, 9:25am UTC](https://community.mp3tag.de/t/tag-filename-conversion-breaks-with-single-double-backslash/58140/8 "2022-08-08T09:25:34Z")

</div>

One way around it would be to merge the duplicate fields into 1 with a different separator than the `\\`  
The semicolon usually works ok.

---

<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-filename-conversion-breaks-with-single-double-backslash/58140/9 "2026-02-09T12:29:53Z")

</div>


