$fext function

$fext(path)

The $fext function returns the file extension of the passed-in path, i.e., the string that starts with the rightmost '.' after the last '\' or '/' separator. If path does not contain a '.' in the final section, the result is an empty string. The result, if not empty, starts with the '.' character.

Parameters

All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.

path
File path from which to extract the extension.

Examples

Here are some usage examples for this function:

<$fext(C:\Program Files\InstallMate\Bin\Tin.exe)>
Returns .exe from the literal path.
<$fext(<INSTALLDIR>\Bin\Tin.exe)>
Returns .exe from the symbolic path, assuming that <INSTALLDIR> resolves to the appropriate folder path.
<$fext(<#Tin_alias>)>
Returns .exe from the file alias path, assuming that Tin_alias is the file alias for the Tin.exe executable.