# Replace invalid Filename characters from Title?

**URL:** <https://community.mp3tag.de/t/replace-invalid-filename-characters-from-title/16142>\
**Category:** Support\
**Created:** [September 15, 2014, 4:03pm UTC](https://community.mp3tag.de/t/replace-invalid-filename-characters-from-title/16142 "2014-09-15T16:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sigrun](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sigrun](https://community.mp3tag.de/u/sigrun)\
**Post date:** [September 15, 2014, 4:03pm UTC](https://community.mp3tag.de/t/replace-invalid-filename-characters-from-title/16142/1 "2014-09-15T16:03:10Z")

</div>

Is there any way to create an action that takes the contents of the TITLE field & puts it into the FILENAME field, but replace any characters that would be invalid in a file name?

For example:

TITLE:  
Piano Concerto No. 20 in D minor, K.466: I. Allegro

The colon is an invalid character for a filename so it becomes...

\_FILENAME:  
Piano Concerto No. 20 in D minor, K.466 I. Allegro

Can I instruct the action to put a "-" in place of a colon, like this

\_FILENAME:  
Piano Concerto No. 20 in D minor, K.466 - I. Allegro

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:** [September 15, 2014, 4:13pm UTC](https://community.mp3tag.de/t/replace-invalid-filename-characters-from-title/16142/2 "2014-09-15T16:13:09Z")

</div>

> [@sigrun](#):
>
> Is there any way ... into the FILENAME field ... replace any characters that would be invalid in a file name? ...

See help manual, function ... $validate(filename, char)

You may create your own specific replacement table ...  
see function ... $replace(string,from1,to1,from2,to2,...)  
see function ... $regexp(string,expression,replacement)

DD.20140915.2018.CEST

---

<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/replace-invalid-filename-characters-from-title/16142/3 "2026-02-09T12:25:16Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


