# Best practise to rewrite filenames from titles incl. special chars?

**URL:** https://community.mp3tag.de/t/best-practise-to-rewrite-filenames-from-titles-incl-special-chars/69171
**Category:** Mac
**Created:** [July 21, 2025, 3:16pm UTC](https://community.mp3tag.de/t/best-practise-to-rewrite-filenames-from-titles-incl-special-chars/69171 "2025-07-21T15:16:48Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [July 22, 2025, 4:05pm UTC](https://community.mp3tag.de/t/best-practise-to-rewrite-filenames-from-titles-incl-special-chars/69171/4 "2025-07-22T16:05:29Z")

</div>

I've moved this to the #Mac category, and on macOS the `$validate()` scripting function is not available.

In your case, Mp3tag automatically replaces characters that can't be used in filenames on macOS (while preserving the contents of the title field, as already pointed out by @MotleyG).

If you want to use a different replacement character, you can use the `$replace()` scripting function, e.g., `$replace(%title%,:,-,/,-)` to replace the special chars by dashes.

* * *

There is also the configuration setting **Replace invalid NTFS characters** at _[Preferences → General → Filenames](https://community.mp3tag.de/t/preferences-and-configuration/56296#filenames-5)_ which is most likely already enabled in your configuration.

> If enabled, characters that are not allowed in Windows NTFS filenames are automatically replaced by an underscore `_` on field lookup. The following characters are replaced: `\ : / * ? < > | "`.

> Enabling the automatic replacement also prevents folder creation when using the converter **Tag - Filename** with fields that contain the forward slash character `/`.

---

_[View the full topic](https://community.mp3tag.de/t/best-practise-to-rewrite-filenames-from-titles-incl-special-chars/69171)._
