FileExtension ( TheFileName )
Returns the file extension from a given file name, regardless of how many periods it has.
Average rating: 5.0 (1 vote) Log in to vote
Ibrahim Bittar Torres - Show more from this author
Eikonsys, S.A. de C.V. http://www.eikonsys.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function is useful in case you need to take action based on a given file name.
It will return the file extension and then you can do things in your calculations or scripts, based on the result.
Example:
Case ( FileExtension ( Files::FileName ) = "docx", "This is a Word Document" ,
FileExtension ( Files::FileName ) = "xlsx" , "This is an Excel spreadsheet" )
Enjoy!
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.