$froot function

$froot(path)

The $froot function returns the root folder on the volume of the passed-in path. If path is empty or not an absolute path, the result is an empty string. For consistency with all other path functions and symbolic path variables, the return value does not include a trailing directory separator.

path must have one of the following formats:

In the first case, $froot returns letter:, in the second it returns \\server\share. See Examples below.

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

Examples

Here are some usage examples for this function:

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