fileextension(
FILEPATH
)

The fileextension( function extracts the extension (if any) from a partial or complete path and filename.


Parameters

This function has one parameter:

filepath – a combined path and file name. This may be either a UNIX path or an HFS path. (See Files and Folders for more information.)


Description

This function extracts the extension (if any) from a partial or complete path and filename.

fileextension("/Users/patjohnson/Documents/Alaska/Denali23.jpg") ☞ jpg
fileextension("Notes.txt") ☞ txt
fileextension("HD:Trips:Family:July4.pdf") ☞ pdf

Note: This function is equivalent to:

?(thetext contains ".",array(thetext,arraysize(thetext,"."),"."),"")

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.