# how do i remove \\ (backslash) from file names

**URL:** https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077
**Category:** Support
**Created:** [August 30, 2014, 3:11pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077 "2014-08-30T15:11:53Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![fatmanpeters](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/a698b9/32.png) [@fatmanpeters](https://community.mp3tag.de/u/fatmanpeters)
#### Post date: [August 30, 2014, 3:11pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/1 "2014-08-30T15:11:53Z")

</div>

how do i remove \ (backslash) from file names when i copying from tag as it will turn it into folders

---

<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 30, 2014, 3:45pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/2 "2014-08-30T15:45:48Z")

</div>

You can keep the mask to create the filename. Only you have to treat it again.  
So instead of only entering (example):  
%track% - %artist% - %title%  
append the following:  
$replace($validate(%track% - %artist% - %title%),'','\_')  
This will replace any backslash with an underscore.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [August 30, 2014, 3:57pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/3 "2014-08-30T15:57:36Z")

</div>

> [@ohrenkino](#):
>
> You can keep the mask to create the filename. Only you have to treat it again.  
> So instead of only entering (example):  
> %track% - %artist% - %title%  
> append the following:  
> $replace($validate(%track% - %artist% - %title%),'','\_')  
> This will replace any backslash with an underscore.

Just released $validate doesn't work with \

Is this a known bug?

---

<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 30, 2014, 4:07pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/4 "2014-08-30T16:07:21Z")

</div>

> [@stevehero](#):
>
> Just released $validate doesn't work with \
> 
> Is this a known bug?

I fell into the same trap as I thought that the backslash would be replaced.  
But as the backslash is a valid character for a fully qualified filename it is ignored by the $validate() function.  
The help categorizes /?\*"\<\>|: as illegal.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [August 30, 2014, 4:17pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/5 "2014-08-30T16:17:16Z")

</div>

> [@ohrenkino](#):
>
> I fell into the same trap as I thought that the backslash would be replaced.  
> But as the backslash is a valid character for a fully qualified filename it is ignored by the $validate() function.  
> The help categorizes /?\*"\<\>|: as illegal.

I would say the function could work for both.  
For a filename remove all:  
\ /?\*"\<\>|:

And for filepaths remove just:  
/?\*"\<\>|:

Just the function coded differently under the hood. Least now I know this is the case. Thanks.

---

<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: [August 30, 2014, 4:40pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/6 "2014-08-30T16:40:17Z")

</div>

> [@stevehero](#):
>
> I would say the function could work for both. For a filename remove all:  
> \ /?_"\<\>|:  
> And for filepaths remove just:  
> /?_"\<\>|:  
> Just the function coded differently under the hood. Least now I know this is the case. Thanks.

Note: The colon is allowed for filepath, at the position right beside the drive letter.

See also ...  
[[F] $validate() broken?](https://community.mp3tag.de/t/8311/12)

DD.20140830.2040.CEST

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [August 30, 2014, 4:54pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/7 "2014-08-30T16:54:18Z")

</div>

> [@DetlevD](#):
>
> Note: The colon is allowed for filepath, at the position right beside the drive letter.
> 
> See also ...  
> [[F] $validate() broken?](https://community.mp3tag.de/t/8311/12)
> 
> DD.20140830.2040.CEST

Well instead of:

> [@](#):
>
> And for filepaths remove just:  
> /?\*"\<\>|:

Remove:  
/?\*"\<\>|

---

<div class="post-metadata">

### Author: ![fatmanpeters](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/a698b9/32.png) [@fatmanpeters](https://community.mp3tag.de/u/fatmanpeters)
#### Post date: [September 2, 2014, 6:54am UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/8 "2014-09-02T06:54:51Z")

</div>

so what do I need to put in my actions

 ![](https://community.mp3tag.de/uploads/default/original/2X/2/22acfecdae7de91b3308af0258ad1960804f6075.jpg)  

 ![](https://community.mp3tag.de/uploads/default/original/2X/2/22acfecdae7de91b3308af0258ad1960804f6075.jpg)

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [September 2, 2014, 7:15am UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/9 "2014-09-02T07:15:40Z")

</div>

> [@fatmanpeters](#):
>
> so what do I need to put in my actions
> 
> ![](https://community.mp3tag.de/uploads/default/original/2X/2/22acfecdae7de91b3308af0258ad1960804f6075.jpg)

$replace($validate($num(%track%,2) %title%),'','\_')

---

<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: [September 2, 2014, 7:28am UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/10 "2014-09-02T07:28:57Z")

</div>

> [@stevehero](#):
>
> $replace($validate($num(%track%,2) %title%),'','\_')

**$replace($validate($num(%TRACK%,2)' '%TITLE%,'\_'),'\','\_')**

Note: The picture from 'fatmanpeters' does not show backslash in the TITLE column, but slash.

DD.20140902.1130.CEST

---

<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: [September 2, 2014, 7:33am UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/11 "2014-09-02T07:33:28Z")

</div>

> [@DetlevD](#):
>
> ...  
> Note: The picture from 'fatmanpeters' does not show backslash in the TITLE column, but slash.
> 
> DD.20140902.1130.CEST

True.  
Yet, the question was about the backslash. Let's see what the OP tells us.  
Anyway: the slash (no "back") gets treated by the $validate() function. The backslash does not.

---

<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:25pm UTC](https://community.mp3tag.de/t/how-do-i-remove-backslash-from-file-names/16077/12 "2026-02-09T12:25:13Z")

</div>


