# \[F\] problems with ":" when renaming file

**URL:** https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [April 5, 2009, 10:49pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205 "2009-04-05T22:49:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Germo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/258eb7/32.png) [@Germo](https://community.mp3tag.de/u/Germo)
#### Post date: [April 5, 2009, 10:49pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/1 "2009-04-05T22:49:54Z")

</div>

if the is a ":" for example in the %album% the ":" should be replaced or filtered out when using  
Konverter \> Tag - Dateiname

But maybe the problem is not the ":" but a "\\" in the new filename.  
This is my formatstring:  
%band%\%album%$num(%track%,2) %artist% - %title%  
but if for example the %band% is empty, the new filepath looks like this:

G:\Musik\\blablabla\01 blablabla  
Better would be:  
G:\Musik\blablabla\01 blablabla  
or  
G:\Musik\_\blablabla\01 blablabla

or better: the %artist% should be used by default if %band% is empty (this is the way some other programs do)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 6, 2009, 1:56pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/2 "2009-04-06T13:56:18Z")

</div>

I use a Action (Alt-5) for this:  
Field: \_FILENAME  
Formatstring: $validate(%album% - %artist% - %title%,)  
This will strip away ANY impossible character, not just the ":"  
There are many more unwanted chars like \ /\*?"\<\>¦....

I have only the german help-text (help/main\_scripting.html)

Ungültige Zeichen aus Dateinamen entfernen

Befehl: $validate(filename, to)

Beispiel: $validate(%artist% - %album% - %track% - %title%,-)  
Dieses Beispiel ersetzt alle für Dateinamen ungültigen Zeichen (/?\*"\<\>|:slight\_smile: in der übergebenen Zeichenkette durch Bindestriche.

---

<div class="post-metadata">

### Author: ![Germo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/258eb7/32.png) [@Germo](https://community.mp3tag.de/u/Germo)
#### Post date: [April 6, 2009, 5:35pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/3 "2009-04-06T17:35:14Z")

</div>

good idea.  
my problem is, mp3tag crashes if there are invalid characters. So my idea is to use this function $validate(filename, to) by default (there is a default formatstring, it is saved anywhere, but I don't know where)

this works fine for me:  
$validate($iflonger(%band%,,%band%,%artist%)$iflonger(%album%,,%album%,unbekannt)$num(%track%,2) %artist% - %title%, -)

---

<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 12, 2009, 5:48pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/4 "2009-07-12T17:48:55Z")

</div>

This has been addressed with the current [Development Build](http://developer.mp3tag.de) Mp3tag v2.43b.

---

<div class="post-metadata">

### Author: ![matt\_t](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@matt\_t](https://community.mp3tag.de/u/matt_t)
#### Post date: [August 18, 2009, 11:00pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/5 "2009-08-18T23:00:15Z")

</div>

> [@LyricsLover](#):
>
> Befehl: $validate(filename, to)

I've tried this:

$validate($num(%track%,2)-%title%,-)

which converts all invalid characters to "-"

Is there anyway to modify this so it converts "/" to "-" and "?" to "¿" and ":" to ";"

This would match the procedure used by dBpoweramp CD ripper, which would make things nice and tidy.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [August 26, 2009, 1:20pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/6 "2009-08-26T13:20:19Z")

</div>

Sorry, I don't now how to make this different conversions.

But during tagging many classical mp3 I found a way to write a /-like sign in the filenames. The needed char has the Unicode U+0338. The easiest way to get it is to start CHARMAP.exe and then scroll down in the Arial font until you find ̸ -\> not /)  
Just make a space before and after this ̸ sign and you can rename your filenames like that:

Wolfgang Amadeus Mozart - Serenade No. 10 for 12 Winds & Contrabass B-Flat-Major, **K. 370a ̸ 361**''Gran Partita'' - Ia. Largo

At least for my Vista that works. I have no idea what kind of impact this could have to other devices like phones or mp3-players! **So use it with caution!!**

---

<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: [December 28, 2018, 2:01pm UTC](https://community.mp3tag.de/t/f-problems-with-when-renaming-file/8205/7 "2018-12-28T14:01:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
