Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Convert command destination script - remove smart quotes (Read 1017 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Convert command destination script - remove smart quotes

Can anyone suggest a way to remove smart quotes (and replace them with dumb quotes) in track titles?

For example, change:

I’ve Got a Feeling

to

I've Got a Feeling

I'd like the change to happen when I use the "Convert" command. My current destination script for the Convert command is:

%album artist%/[$cut(%date%,4) - ]%album%/%discnumber%.%tracknumber% - %title%

How can I modify %title% to replace smart quotes with dumb quotes?

What if I want to do the reverse? Change dumb quotes to smart? This is probably harder...

Thanks!

 

Convert command destination script - remove smart quotes

Reply #1
Quote
How can I modify %title% to replace smart quotes with dumb quotes?

$replace(%title%,’,'')

Quote
$replace(a,b,c)

Replaces all occurrences of string b in string a with string c.

Can also be used with an arbitrary number of arguments. Note that $replace(a,b1,c1,b2,c2) is generally not the same as $replace($replace(a,b1,c1),b2,c2).

Example: $replace(ab,a,b,b,c) → "bc", $replace($replace(ab,a,b),b,c) → "cc"


note: The value of C in my example ['](apostrophe / single quote / dumb quote) is purposely doubled.
Quote
' (single quotation mark)

Inserts specified text bypassing syntax processing; allows special characters such as %,$,[,] to be inserted. In order to insert a quotation mark character, use '' (two single quotation marks).