INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need help with expression...  (Read 978 times)

ksvane

  • World Citizen
  • ***
  • Posts: 124
Need help with expression...
« on: June 11, 2013, 02:02:15 pm »

I want to automatically rename the music files in my library so that they are named after track# and title like this: "01 Song Title.m4a".
I want to zero pad any track number that is between 1-9, and if the track number has no value I want the track to be named after the title only: "Song Title.m4a".

The expression I've composed looks like this but doesn't work:
If(IsEmpty([Track #]),,padnumber([track #] ,2)[Name])

Help!
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Need help with expression...
« Reply #1 on: June 11, 2013, 02:12:38 pm »

Maybe I misunderstand something but why don't you do that with the rename tool?
Logged

ksvane

  • World Citizen
  • ***
  • Posts: 124
Re: Need help with expression...
« Reply #2 on: June 11, 2013, 02:21:30 pm »

That's what I'm doing, and the expression is for the filename rule field.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Need help with expression...
« Reply #3 on: June 11, 2013, 02:32:58 pm »

Code: [Select]
if(isempty([track #],1),[Name],[Track #] [Name])
Logged

ksvane

  • World Citizen
  • ***
  • Posts: 124
Re: Need help with expression...
« Reply #4 on: June 11, 2013, 03:02:39 pm »

Of course!! Silly me.

Thanks!! ;D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Need help with expression...
« Reply #5 on: June 19, 2013, 10:34:44 pm »

Try this magic:

   Delimit([track #],/ ,)[Name]
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up