I am trying to retrieve the file version information for a list of files
(unsuccessfully). The objective is to find the version information on a
list of file in a single user-defined path. In this sample, I'm attempting
to retrieve the version of these files in the c:\windows\system32 directory,
where installpath is the directory where the files are found.
Should I be using foreach to repeat steps for each file in the list?
#------------Begin script sample
param(
[string] $installpath = $(Throw "installpath required.") #required parameter
)
$files = $installpath + "\dfrgsnap.dll",$installpath + "\dfrgui.dll",$installpath
+ "\dfsshlex.dll"
dir $files | format-list VersionInfo
#------------End script sample
Regards,
Pete Zerger, MCSE(Messaging) | MCTS(SQL 2005) | MCTS(Opsmgr) | MVP - Opsmgr
URL:
http://www.systemcenterforum.org
User Group:
http://www.systemcenterusergroup.com
MP Catalog:
http://www.systemcenterforum.org/mps