Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Get Version from File Property of DLL OCX EXE

Status
Not open for further replies.

dgschnei

Technical User
Nov 26, 2002
14
0
0
US
Hello all,

I am trying to write a scrip that will output the following information:

List of files (DLL EXE OCXs) and their version.

How can I read the VERSIONs DLLs, EXEs, OCXs located in a folder?

"Version" being the value obtained when using right click and file property in the Version tab of the property dialog box.

In other words how do I programmatically determine the versions?

Here is an example of the ouput I would like to get:

FILEA.dll version 2.0.0.3
FILEB.ocx version 5.1.3079.0
FILEC.exe version 6.3.81.69
FILED.dll version 1.3.0.44

and so on ...

Thanks in advance for your help!

Dominique G. Schneider
 
Take a look at the GetFileVersion method of the FileSystemObject.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you very much for your help!

Code:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder("D:\DomiFolder")

Set F_Files = Folder.Files

For Each File In F_Files

    MsgBox File.Path & chr(32) & FSO.GetFileVersion (File.Path) 

Next

Great forum, great help!

[thumbsup2]


Dominique G. Schneider
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top