Note that some files do not contain version information, or perhaps it is in
a format that Windows doesn't understand. If you can navigate to the folder
containing your files of interest, and add a column to display Product
Version, and the version info you want is then displayed, the
Shell.Application object can be used to get the file version info. I have
not been able to get info through the Shell.Application object for hidden
files. After learning a few things, script the process is pretty easy.
Just a few weeks ago someone asked a similar question. Here is a link to
the entire thread:
http://groups.google.com/g/78d7fef5/...7b1052f9b79238
You should find a script I authored that displays a list of column names for
all available columns for each file in a folder, but only those columns for
which there is a value for that file. As written, the script displays info
for files in the recycle bin.
To verify the script will work for you, create a test folder and copy one
file into it, one that you know has the version info you are looking for.
Change line 7 to reference your folder of interest, something like:
Set oShFlder = oShellApp.NameSpace("C:\scratch")
Also, comment out line 10, so it looks something like:
'Set oShFlder = oShellApp.Namespace(RECYCLE_BIN)
Then run the script. When I copy a file from my Adobe Acrobat program file
structure, named edb500x.dll, to my c:\scratch folder, and run the script, I
get a message box with the following info:
Name: edb500x.dll 0
Size: 584 KB 1
Type: Application Extension 2
Date Modified: 6/28/2002 10:11 AM 3
Date Created: 6/28/2002 10:11 AM 4
Date Accessed: 6/24/2009 1:34 PM 5
Attributes: A 6
Status: Online 7
Owner: Administrators 8
Company: Simple Software Solutions, Inc. 35
Description: e_Db 5.0 Expert Edition 36
File Version: 5.0.0.1 37
Product Name: e_Db 5.0 Expert Edition 38
Product Version: 5, 0, 0, 1 39
The number at the end of each line is the column number used to get the
info.
The script produces a similar message box for each non-hidden file in the
folder.
-Paul Randall
"Gavaskar" <nospam@xxxxxx> wrote in message
news:e7cM%23aP9JHA.1880@xxxxxx
Quote:
> Hello
>
> How do I get the value of the file version or product version property of
> a file in a VB script?
>
> thanks
>