INTERACT FORUM

Please login or register.

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

Author Topic: Expression Help Yet Again  (Read 1273 times)

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Expression Help Yet Again
« on: August 19, 2017, 05:20:25 pm »

Hi all,

I'm looking to insert an expression into the Rename, Move, & Copy Files "Directories" Rule. Basically, I want the rule to check to see if there is are [Disc#]s, and if so organize the new folder by them; otherwise, I want to just have the album name.

For example, in the moved to folder (say H:\Classical Music), I might have the single album "Beethoven: Symphonies Nos. 5 & 7," so: H:\Classical Music\Beethoven:_Symphonies_Nos._5_&_7. However if it was a small box set like "Beethoven: The Symphonies," I'd want "H:Classical Music\Beethoven:_The_Symphonies\1" and "H:Classical Music\Beethoven:_The_Symphonies\2" and so forth. I tried a couple of if() and ifelse() expressions, but I couldn't get anything to work quite right.

Thanks for any help!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Expression Help Yet Again
« Reply #1 on: August 19, 2017, 05:53:35 pm »

You can put this expression fragment after your directory rule and it should do what you want:

Code: [Select]
if(!isempty([Disc #],1),[Disc #],)
Brian.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Expression Help Yet Again
« Reply #2 on: August 19, 2017, 06:11:23 pm »

Ah, it was that comma after [Disc #]. I had the rest of the expression right, but I didn't know how to get it to basically revert to [Album] if [Disc#] was empty.

Thanks!
Logged
Pages: [1]   Go Up