How Do I replace ? and / with _


#1

I'm looking to replace the ? to _ when I convert the tag to filename. Also how do I replace the / with _ when I convert the tag to filename.

Example: Maroon 5 - Secret / Ain't No Sunshine
To Filename: Maroon 5 - Secret _ Ain't No Sunshine

           Maroon 5 - How Are You?

To Maroon 5 - How Are You_

I only use the / to separate song titles in a melody

Thanks.


#2

Use $validate(filename string,_)
This replaces the invalide filename characters /?*"<>|: with _


"Tag - Filename" character replacement
Feature Request - Charactor Substitution for Filenames for Invalid Charactors
#3

[quote name='compubob' post='50254']
I'm looking to replace the ? to _ when I convert the tag to filename. Also how do I replace the / with _ when I convert the tag to filename.

Example: Maroon 5 - Secret / Ain't No Sunshine
To Filename: Maroon 5 - Secret _ Ain't No Sunshine

           Maroon 5 - How Are You?

To Maroon 5 - How Are You_

I only use the / to separate song titles in a melody

Thanks.
[/quote

How and where do I use this script?


#4

How and where do I use this script. Thank You for your help!


#5

What about using it in convert Tag to Filename as in your original question




#6

Thank You All For The Help. Now this program works exactly as I need it. :smiley:


#7

This is a great question. I use invalid characters in the actual tag fields, but always have to replace them in file names. I use ^ instead of _, though.

Is there any way to get the program to replace invalid characters with ^?


#8

... and already answered.

You can take the Mp3tag manual and look for scripting functions ...
http://help.mp3tag.de/main_scripting.html
$replace()
$validate()
... both functions can do the replacement of characters in their special way.

DD.20101113.1756.CET