$fdir function

$fdir(path)

The $fdir function returns the folder path of the passed-in path, i.e., it removes the section after the last '\' or '/' separator in the path. If path does not contain any '\' or '/' separators, the result is an empty string; if path ends with a '\' or '/' separator, only that separator is removed. The resulting folder path does not include the final separator.

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 folder path.

Examples

Here are some usage examples for this function:

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