Help - Search - Members - Calendar
Full Version: How can I remove the tracknumber?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Lehti
Hey!
I recently switched to foobar2k from the heavy Winamp.
Now I'm facing a tiny problem; my audio files are named so that the tracknumber is in the middle, like skid
row - 13 - breakin' down (remix).mp3
and I'd like to remove it when I copy the song title on the clipboard.
So the outcome should be this np: skid row - breakin' down (remix) when I paste it. I've worked out
everything else, but I just don't know how to hide the tracknumber, because I never use IDtags.
gfngfgf
Try this:

CODE
$replace(%_filename%,$substr(%_filename,$strchr(%_filename%,'-'),$sub($strrchr(%_filename%,'-'),1)),)

This should work as long as there are no other hyphens in the filename.

edit: just in case you do have other hyphens in the filename, let me ask: is the tracknumber always two digits, or do you use single digits, too?
lav-chan
If you never have an artist with ' - ' in the name, and if your track numbers are all zero-padded, you could also try this:

$left(%_filename%,$sub($strstr(%_filename%,' - '),1))' - '$substr(%_filename%,$add($strstr(%_filename%,' - '),6),$len(%_filename%))
Lehti
Yes indeed, the tracknumber is always two digit.
Thanks to you both, I got it to work with a tiny modification of the phrases you provided. smile.gif

np: kingston wall - i feel love
kjoonlee
If your files had been fully tagged, you could have used "np: [%artist% - ]%title%[ '('%version%')']".
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.