INTERACT FORUM

Please login or register.

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

Author Topic: Help with renaming rule  (Read 1776 times)

jherbert

  • World Citizen
  • ***
  • Posts: 120
Help with renaming rule
« on: July 05, 2010, 08:03:22 am »

I could not figure out the correct syntax for renaming my files.

I want to generate a filename that consists of [Disc #]-[Track #] [Name] if [Disc #] is not empty and [Track #] [Name] if [Disk #] is empty.

Tried several versions of

If(IsEmpty([Disc #]),[Disc #]-[Track #],[Track #]) [Name]

without success. Maybe somebody around here can help.
Logged

Quixote

  • Regular Member
  • World Citizen
  • ***
  • Posts: 158
  • Change this by choosing profile
Re: Help with renaming rule
« Reply #1 on: July 05, 2010, 08:45:49 am »

IsEmpty() doesn't work well in Renaming expressions.  You need to use IsEqual() and compare it to "unknown" and "8" parameter = substring search (case insensitive).


Code: [Select]
If(IsEqual([Disc #],unknown,8),[Track #],[Disc #]-[Track #]) [Name]
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Help with renaming rule
« Reply #2 on: July 05, 2010, 11:57:39 am »

Try
Code: [Select]
If(IsEmpty([Disc #]),,[Disc #]-)[Track #] [Name]
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Help with renaming rule
« Reply #3 on: July 05, 2010, 01:02:03 pm »

Here's what I use:

Directories:
[Album Artist (auto)]\[Album]\

Filename:
If(IsEmpty([Disc #],1), [track #], CD[Disc #] - [track #]) - If(IsEqual([Album Type], Multiple Artists /(complete/), 1), [Artist] - [Name], [Name])


Some examples of the resulting filenames:

Single Artist, no disc number:
\The Cure\Japanese Whispers\06 - Speak My Language.mp3

Single Artist, disc number:
\Bob Marley & The Wailers\Burnin' (Deluxe Edition)\CD2 - 08 - Kinky Reggae.mp3

Multiple Artists, tagged Album Artist, no disc number:
\Tiësto\Elements Of Life\03 - Tiësto feat. Julie Thompson - Do You Feel Me.mp3

Multiple Artists, automatic Album Artist value, disc number:
\(Multiple Artists)\Champs-Élysées Café\CD2 - 04 - Chateau Flight feat. Beretta 9 - Down At The Rotisserie.mp3

-- The text string "CD" will be added if the "Disc #" field has a value.


Marko has posted a nice example of a comprehensive renaming rule here:
http://yabb.jriver.com/interact/index.php?topic=51475.msg351347#msg351347
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jherbert

  • World Citizen
  • ***
  • Posts: 120
Re: Help with renaming rule
« Reply #4 on: July 06, 2010, 02:06:19 am »

Thank you very much. Works just great now!
Logged
Pages: [1]   Go Up