# Convert "Tag to Filename" command and filenames beginning with a period character

**URL:** <https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313>\
**Category:** Support\
**Created:** [April 3, 2018, 2:34pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313 "2018-04-03T14:34:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KPexEA](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/a183cd/32.png) [@KPexEA](https://community.mp3tag.de/u/KPexEA)\
**Post date:** [April 3, 2018, 2:34pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313/1 "2018-04-03T14:34:46Z")

</div>

I'm using the "Convert tag to Filename" command with the following: $validate(%title%,\_)

This works great, except occasionally it will generate filenames beginning with a period character which get ignored by both Foobar and Kodi as "hidden" system files.

If the first character of the filename is a period, is there a way to have it converted to an underscore?

---

<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:** [April 3, 2018, 4:42pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313/2 "2018-04-03T16:42:39Z")

</div>

there is not automatism as the dot is a legal character for filenames.  
But you could enclose the whole expression for the converter into a $replace() function, e.g.

$replace(%artist%-%title%,.,\_)

---

<div class="post-metadata">

**Author:** ![KPexEA](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/a183cd/32.png) [@KPexEA](https://community.mp3tag.de/u/KPexEA)\
**Post date:** [April 3, 2018, 8:05pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313/3 "2018-04-03T20:05:52Z")

</div>

> [@ohrenkino](#):
>
> $replace(%artist%-%title%,.,\_)

Is there a way I can replace the dot character only if it is in the first position?

---

<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:** [April 3, 2018, 8:14pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313/4 "2018-04-03T20:14:23Z")

</div>

try as format string:  
`$regexp('.hello',^\.,_)`  
this leads to \_hello  
So instead of the '.hello' insert your list of fields.

Please note that I edited this post and added a `\`in front of the dot

---

<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:27pm UTC](https://community.mp3tag.de/t/convert-tag-to-filename-command-and-filenames-beginning-with-a-period-character/41313/6 "2026-02-09T12:27:21Z")

</div>


