INTERACT FORUM

More => Old Versions => Media Center 16 (Development Ended) => Topic started by: Bill S on September 17, 2011, 01:43:33 pm

Title: Expression - Cutting articles in "Rename, Move & Copy"?
Post by: Bill S on September 17, 2011, 01:43:33 pm
I'm starting to use expressions for "Directories" and "Hierarchy" in the "Rename, Move & Copy" dialog box and have a question for all you expression experts...

I wanted my [album artists (auto)] saved in a 'grouping folder', for example 'A-C', 'D-F' etc... and was able to do this using FORMATRANGE in the 'rule' box of "Rename, Move & Copy".  For example:

  FORMATRANGE([Album Artist (auto)]3,0)\etc...

But then I found that all my 'The' bands (i.e., The Beatles, The Doors, etc...) were grouped in a T folder (i.e., G:\S-U\The Beatles\etc..). After digging around I found the nifty CLEAN expression:

  FORMATRANGE(CLEAN([Album Artist (auto)],2),3,0)\[Album Artist (auto)]\etc...

Using CLEAN as shown above results in The Beatles folder being saved into an A-C folder which is what I wanted. Yeah!

But now I think I would like to try and take this one step further and eliminate the article from the artists name when doing the Rename, Move & Copy, but not from the name in MC itself since MC can be set to ignore articles.

In otherwords instead of:
  G:\A-C\The Beatles\etc..

I would like:
  G:\A-C\Beatles\etc..

... but I would like to keep the name in MC as 'The Beatles'.

I thought of creating a new custom 'album artists' field that populates with the artist name minus the article and then using that field in the expression, but I'm hoping there's something not too complicated that I can do in the expression instead. 

Any suggestions?  Thanks!!!

--------------------------------------
My "Rename, Move & Copy" "Rules" expression so far:
  FORMATRANGE(CLEAN([Album Artist (auto)],2),3,0)\[Album Artist (auto)]\etc...

Reference (great page btw, thanks to the contributers!):
  http://wiki.jriver.com/index.php/Media_Center_expression_language
--------------------------------------
Title: Re: Expression - Cutting articles in "Rename, Move & Copy"?
Post by: Bill S on September 17, 2011, 02:46:08 pm
Never mind!

I forgot I was only using CLEAN for the grouping and that I also need to use it where I name the folder underneath the grouping:
  FORMATRANGE(CLEAN([Album Artist (auto)],2),3,0)\CLEAN([Album Artist (auto)],2)\etc...

The above results in exactly what I want, The Beatles are saved as
  G:\A-C\Beatles\etc...

Sorry for the confusion.  I must say that everytime I really dig into J River Media Center I have a better appreciation for all that I can do with it.  Love it.






Title: Re: Expression - Cutting articles in "Rename, Move & Copy"?
Post by: marko on September 17, 2011, 05:56:31 pm
Reference (great page btw, thanks to the contributers!):
  http://wiki.jriver.com/index.php/Media_Center_expression_language
You're welcome, thanks for the feedback.

I must say that everytime I really dig into J River Media Center I have a better appreciation for all that I can do with it.
still true for me after eight years :)

-marko