@CMPVER
— Compares version
numbers of two files.
Syntax:
%@CMPVER[
file1,
file2,
flags]
file1 | the first file to examine |
file2 | the second file to examine |
flags | 1: do not assume 0.0.0.0 |
Both files must exist. Directory aliases are supported. If either file
does not contain version information, this function will assume
0.0.0.0
— unless flags is
1
, in which case the function will give an error instead.
Return values:
-1 | if file1 has a lower version number than file2, |
0 | if both files are the same version, |
1 | if file1 has a higher version number than file2. |
echo %@cmpver[%@search[notepad.exe],%@search[ping.exe]]