Yeah, I know how you feel. It definitely is a pile 'o script in such a tiny box. :) We basically have the same format with the date moved and a few other minor differences, so it's just a matter of moving stuff around.
The underscore and other replacement happens inside all those $replace($replace($replace($replace statements. Unfortunately, I don't know of any way in Picard to condense it into one $replace() It can be done, just not sure about in Picard. For some reason, I had the replacements duplicated in there. No idea why. Sleep deprivation, probably. No matter, I'll rewrite it to match what you wanted.
[elapse 10 mins]
OK. Try this:
Single Artist:
$replace($replace($replace($replace($replace($if2(%artist%,%albumartist%)\\$if2(%artist%,%albumartist%) - %album% [$left(%date%,4)]\\$num(%tracknumber%,2) $if2(%artist%,%albumartist%) - %title%,?,),/,-),_, ),*,x),:, -)
Various Artists:
Only one difference: $if2(%artist%,%albumartist%) is changed to $if2(%albumartist%,%artist%) in both places it's used. So:
$replace($replace($replace($replace($replace($if2(%albumartist%,%artist%)\\$if2(%albumartist%,%artist%) - %album% [$left(%date%,4)]\\$num(%tracknumber%,2) $if2(%artist%,%albumartist%) - %title%,?,),/,-),_, ),*,x),:, -)
Output: F:\mp3\scrounged\The Beatles\The Beatles - Help! [1965]\07 The Beatles - Ticket to Ride.mp3
This one does the following replacements:
? to <nothing>
_ to <space>
* to x (To note unreleased/demo tracks: 01. SomeBand - SuperSecret Track [x].mp3 )
: to <space>-
/ to -
In my version I had underscores replaced by nothing, to help avoid double spaces, but I changed it for ya.
If you want to alter any of the replacements, just look for the character,replacement) at the end of the string: ,?,),/,-),_, ),*,x),:, -)
Each $replace( has one ,foo,bar) and that's where they do their magic...one at a time.
If you want to add more replaces, just add a $replace( somewhere with the others, and add the replacement stuff at the end of the string:
$replace($replace($replace($replace($replace(blahblahblah %title%,?,),_, ),*,x),:, -)!!!,!)
(That'd replace !!! with !)
Anyway, it worked for me. Hopefully it should work for you as well. Let me know if not. :)
Kel
With the right gear, even a half-deaf audio engineer could make a dog stuck in a sewer pipe sound like the Mormon Tabernacle Choir.
-Kelani (1995)