FileVersion

FileVersion returns the version of a file if it has the necessary properties assigned.

Syntax

FileVersion (String)

Returns

Version of the file if file version information exists (returns a string).

Example

Displays the file version of the calc.exe:

Function Main

Dim textfile As Object

Dim ver As String

Set textfile = File.Connect("127.0.0.1")

If textfile.Open("c:\windows\system32\calc.exe", GENERIC_READ, Open_Existing) Then

ver = Textfile.FileVersion

echo("Your Calc.exe file version is : " & ver)

textfile.Close

End If

End Function