INTERACT FORUM

More => Old Versions => JRiver Media Center 20 for Windows => Topic started by: Mossey on August 20, 2015, 10:39:14 am

Title: Expression Language Syntax ?
Post by: Mossey on August 20, 2015, 10:39:14 am
Can someone supply the correct syntax for removing the file extension from an Image title? I have tried at least 50 variations and nothing returns the result I am looking for.
thanks ?
Title: Re: Expression Language Syntax ?
Post by: Matt on August 20, 2015, 10:45:22 am
Just remove right the four characters.

For example:
RemoveRight(song.mp3, 4)

Will output:
song
Title: Re: Expression Language Syntax ?
Post by: Mossey on August 20, 2015, 11:57:17 am
Sorry, thanks for trying to help but I am just to stupid to get it. I don't get the jist of which fields refers to what. All I get back when I tried your solution was the word, name. Currently in the field is
"[Filename (name)] " so now what and how am I refering to this or editing this output.
Title: Re: Expression Language Syntax ?
Post by: Dirhael on August 20, 2015, 12:09:36 pm
A more reliable way to do this (imo):

Add an expression column, with the following content:
Code: [Select]
Replace([Filename (name)], .[File Type],)
Matt's example will work in most cases, but will fail if the file has an extension with more or less than 3 characters (such as *.flac, *.jpeg etc.).
Title: Re: Expression Language Syntax ?
Post by: glynor on August 20, 2015, 02:44:37 pm
Just remove right the four characters.

For example:
RemoveRight(song.mp3, 4)

Will output:
song

Code: [Select]
Replace([Filename (name)], .[File Type],)
Matt's example will work in most cases, but will fail if the file has an extension with more or less than 3 characters (such as *.flac, *.jpeg etc.).

There's an easier way, which always works and always removes just the extension.

Filename(,0)
Title: Re: Expression Language Syntax ?
Post by: Mossey on August 21, 2015, 10:51:34 am
Thanks very much for everyone's help. Problem is solved!