INTERACT FORUM

Please login or register.

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

Author Topic: NEW: Added a FileExtension expression function. (32.0.13)  (Read 448 times)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
NEW: Added a FileExtension expression function. (32.0.13)
« on: March 23, 2024, 04:26:12 am »

I added this to the wiki today, and whilst doing so, couldn't help wondering, why does this exist...?

We already have the [file type] library field... It's the same, yes?
Also, if you reference a specific filename literally, you'd have to know the extension already.

Is there any background to this function's creation that I could add to the wiki entry to emphasise its usefulness?

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: NEW: Added a FileExtension expression function. (32.0.13)
« Reply #1 on: March 23, 2024, 04:58:43 am »

you can get file extension for any file you feed to it i think. so not just the one which is selected which is what "file type" is showing.

FileExtension(c:\JustSomeFile.ext) will return ext
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: NEW: Added a FileExtension expression function. (32.0.13)
« Reply #2 on: March 23, 2024, 05:12:25 am »

yeah, I get that, but how or where, is that useful? If you're feeding it a literal filename, you already know the extension...

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: NEW: Added a FileExtension expression function. (32.0.13)
« Reply #3 on: March 23, 2024, 06:07:25 am »

yeah, I get that, but how or where, is that useful? If you're feeding it a literal filename, you already know the extension...
Helper, so you don't have to parse it yourself like ListItem(c:\somefile.ext,-1,.). You might like to check a file that is not the one selected or even in the library. Can't think any other UC but perhaps there is...

Maybe e.g. to check if poster or cover art for this file is png or jpg or something like that
Logged
Pages: [1]   Go Up