Dropping the first n characters from a title of filename


#1

Just got the program, have read the faqs (adequately I trust!) but still have the following question.

I'm trying to:

  1. Drop the first n characters from each in a list of MP3 filenames
  2. Drop the first n characters from each in a list of MP3 titles

I think I should be able to use a (format) action query as follows:

$right(%title%,$len(%title%)-n)

where, for me, n might be 2 or 4 if I've appended the track number to the filename/title or maybe 25 if the "get info" on the internet has put a mass of album stuff at the front of each title.

But this doesn't work for me

I read the question on truncating comment fields to 32 characters, and thought this was a simple extension. I've also checked that I can get the leftmost 10 characters with:

Field: TITLE
FormatString: $left(%title%,10)

Ditto with rightmost of course.

Great program. For the benefit of other Creative Zen users (after this query gets spidered) I've used this program to:

  1. Automatically increment track numbers (the Zen will play track 1 from disc 1 then track 1 from disc 2 then track 2 from disc 1 etc - not so hot with classical albums!)

  2. Then add the track number (in the format NN) to the tront of the title. This avoids Zen playing all the tracks in alphabetical order (again a bit of a downer for classical fans)

Thank you for this program! If I get a decent reply on this a PayPal will certinly be on its way.


#2

Subtraction needs a function:
$right(%title%,$sub($len(%title%),n))


#3

Welcome 'coolactuary'.
All what you explain above sounds clear and I think you know what you will do.
Hmm, on awaiting paypal money in the queue, I will try to earn some money for the developer Florian.

In Mp3tag script language you have to use built-in functions to perform mathematical expressions.
$add(x,y) adds y to x.
$sub(x,y) substracts y from x.
$mul(x,y) multiplies x by y.
$div(x,y) divides x by y.
$mod(x,y) returns the remainder of x divided by y.

Mp3tag supports only integer arithmetic.

Your example from above should read:
$right(%title%,$sub($len(%title%),n))

DD.20070202.1810


#4

Have just come from PayPal :slight_smile: You guys (thanks to Dano too of course) were great and amazingly fast. Sorry about missing "sub" - I must get better at reading documentation and not assuming everything works like Excel :slight_smile: