$fverf function
$fverf(path)
The $fverf function returns the file version of the file specified by path, as 4 decimal numbers separated by periods: a.b.c.d, from most to least significant. If path does not refer to a file, if the file does not exist, or if the file does not have a VERSIONINFO resource, the result is 0.0.0.0.
You can use the resulting version as-is, or compare it against another version with the $vercmp function. To retrieve the file's file version and compare it against a given version in a single operation, you can use the $fverfcmp function. To retrieve the file's product version instead of its file version, use the $fverp function.
Parameters
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
- path
- File path of the file whose file version must be retrieved.
Examples
Here are some usage examples for this function:
- <$fverf(<WindowsFolder>\Notepad.exe)>
- Returns the Notepad.exe file version, for example 5.1.2600.2180 (for Windows XP).
- <$vercmp(<$fverf(<WindowsFolder>\Notepad.exe)>, 5)>
- Compares the Notepad.exe file version to 5.0.0.0 and returns a value < 0, 0, or > 0 depending on the result. You can achieve the same effect with less typing by using <$fverfcmp(<WindowsFolder>\Notepad.exe, 5)>.
- <$fverf(<#Tin_alias>)>
- Returns the file version of the Tin.exe executable, assuming that Tin_alias is the file alias for that file.