Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Featured Replies

This has got to be the most basic thing but... needing to remove filename suffixes I try: "leftwords ( filename.ai ; 1)" expecting it to return "filename"? but get "filename.ai". I am using "Trim (Substitute (filename; ".ai"; "") to achieve the result but it seems a bit flakey; what if the suffix is .psd for instance?. Any ideas?

Edited by Guest

I think you need Left(text; Position ( text ; "." ; 1 ; 1 ))

You'd replace numOfChars in the Left function with the results of the Position function.

HTH

  • Author

Good one; thanks but you have to put "-1" at the end, otherwise you get the "." :)-

Left ( file name; Position ( file name ; "." ; 1 ; 1 )-1)

Ha - I always forget that one. :) But it pointed you in the right direction at least.

Actually, since file name can contain more than one period (at least in OS X it can), e.g. "MyFile.fp7.zip", it should be:

Left ( FileName ; Position ( FileName ; "." ; Length ( FileName ) ; -1 ) - 1 )

True. My bad.

  • Author

yeah, but only if you want to return all bar the last suffix.

"guff.guf.guf" yields "guff.guf"

hmmm... and leftwords needs a space after the "."

Your original question was:

needing to remove filename suffixes ... expecting it to return "filename"

I believe the filename suffix (or more precisely, the filename extension) IS the last suffix - and ONLY the last suffix. Everything bar the last suffix IS the filename. If your requirement is different, please clarify.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.