Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.
Also make sure you've read the Forum Guidelines before posting in this forum.
![]() ![]() |
Jun 23 2007, 21:24
Post
#1
|
|
|
Member Group: Full Members Posts: 8 Joined: 22-June 07 Member No.: 5153 Mp3tag Version: 2.41 |
Hi
Im looking for some help, I want to change any of illegal filename chars (like ":", "*", "\", "/", etc) for a " - ". Some tags have this chars, and then when I convert Tag to Filename, they are replaced with "". But then I want to replace with " - ". How can I do that? |
|
|
|
Jun 23 2007, 22:00
Post
#2
|
|
|
Member Group: Full Members Posts: 737 Joined: 21-September 06 From: Central Europe Member No.: 3709 Mp3tag Version: 2.54 |
Please have a look in the help-file "main_scripting.html":
$validate(filename, to) Example: $validate(%artist% - %album% - %track% - %title%,-) Thats the "magic" command. |
|
|
|
Jun 24 2007, 03:22
Post
#3
|
|
|
Member Group: Full Members Posts: 8 Joined: 22-June 07 Member No.: 5153 Mp3tag Version: 2.41 |
thanks for the answer
but there is a way to replace only ":" and "/" for " - " ? because tags with "?", for example, I want to leave as "" (blank) in filename. |
|
|
|
Jun 24 2007, 10:55
Post
#4
|
|
|
Member Group: Full Members Posts: 737 Joined: 21-September 06 From: Central Europe Member No.: 3709 Mp3tag Version: 2.54 |
Your initial question was about valid filenames.
You have to change this characters /?*"<>|: to something else. Otherwise, you can't save it to the filename. What you can do, to replace single chars in all tagfields, is executing an action like this: Aktionstyp: Ersetzen Feld: _ALL Original: ? Ersetzen durch: <-- Enter a <space>! This will replace the character ? in ALL tagfields with a <space> (If you wanna rename the ? only in TITLE, replace _ALL with TITLE. If you wanna rename the : with a - just replace the ? and <space> in the fields above) Then you can rename your mp3 according to the changed tagfields like this: Aktionstyp: Tag-Felder formatieren Feld: _FILENAME Formatstring: %album% - %artist% - %title% (or whatever fields you like to use...) |
|
|
|
Jun 29 2007, 23:57
Post
#5
|
|
|
Member Group: Full Members Posts: 8 Joined: 22-June 07 Member No.: 5153 Mp3tag Version: 2.41 |
I've found a way to do what I want:
I created a new action group, called tag-filename then I add the following: Format value Field: _FILENAME Format String: %TRACK% - $caps2(%TITLE%) then, in the same action group: Replace with regular expression Field: _FILENAME Regular Expresion: "/" (without quotes) Replace matches with: " - " (without quotes) then add a new Replace with regular expression, modifying the "/" with ":" and the " - " with " -" this will replace all filenames with format like this "02 - Song Title" I don't know if there is a simple way to do this, but for now, it fits my needs ____________________________________________________________________ So there is another question I found that $caps2 its the best case conversion method, cause it leaves some upper case senteces like they should be, not capitalizing only the first letter like the "case conversion - mixed case" action does So then I want some kind of case conversion that is like the $caps2, but I need that the first letters after " (_-/ " capitalize too, a feature that the case conversion action has, but $caps2 does not. For example, a title like "Rock in the USA (yeah!)": with $caps2, it becomes "Rock In The USA (yeah!)" and with cave conversion action, "Rock In The Usa (Yeah!)" When it should be like "Rock In The USA (Yeah!)" WHAT SHOULD I DO TO SOLVE THIS? I have trouble to to the coding =| help me please! This post has been edited by lingburg: Jul 1 2007, 06:20 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 04:19 |