INTERACT FORUM

Please login or register.

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

Author Topic: Expression Language Syntax ?  (Read 2262 times)

Mossey

  • Recent member
  • *
  • Posts: 5
Expression Language Syntax ?
« 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 ?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Expression Language Syntax ?
« Reply #1 on: August 20, 2015, 10:45:22 am »

Just remove right the four characters.

For example:
RemoveRight(song.mp3, 4)

Will output:
song
Logged
Matt Ashland, JRiver Media Center

Mossey

  • Recent member
  • *
  • Posts: 5
Re: Expression Language Syntax ?
« Reply #2 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.
Logged

Dirhael

  • World Citizen
  • ***
  • Posts: 177
Re: Expression Language Syntax ?
« Reply #3 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.).
Logged
:: My J​RMC history :: 13>14>15> 16>17>18>19>20>21>23>24>25>26>27>28>29>30>31

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Language Syntax ?
« Reply #4 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)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Mossey

  • Recent member
  • *
  • Posts: 5
Re: Expression Language Syntax ?
« Reply #5 on: August 21, 2015, 10:51:34 am »

Thanks very much for everyone's help. Problem is solved!
Logged
Pages: [1]   Go Up