$sfn function
$sfn(path)
The $sfn function returns the Short File Name (8.3) version of the passed-in path. If path is empty or refers to a non-existing file or folder, the result is an empty string. The function can be used for both folder and file paths.
Parameters
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
- path
- File or folder path to convert to SFN format.
Examples
Here are some usage examples for this function:
- <$sfn(C:\Program Files\InstallMate\Bin\Tin.exe)>
- Returns C:\PROGRA~1\TARMAI~1\Bin\Tin.exe from the literal path.
- <$sfn(<INSTALLDIR>\Bin\Tin.exe)>
- Returns C:\PROGRA~1\TARMAI~1\Bin\Tin.exe from the symbolic path, assuming that <INSTALLDIR> resolves to the appropriate folder path.
- <$sfn(<#Tin_alias>)>
- Returns C:\PROGRA~1\TARMAI~1\Bin\Tin.exe from the file alias path, assuming that Tin_alias is the file alias for the Tin.exe executable.
- <$sfn(<$fdir(<#Tin_alias>)>)>
- Returns C:\PROGRA~1\TARMAI~1\Bin from the folder path that is extracted from the file alias path by the $fdir function, assuming that Tin_alias is the file alias for the Tin.exe executable.