newbie problem - file revision & size



I have a bunch of machines on which I need to check .dll revisions. I'm trying
to write a simple(?) script to do this. here's what I have so far:

'---------------------------------------------------------------------------
strComputer = "."
Set objFSO = CreateObject("Scripting.FileSystemObject")

strNames = & _
"c:\winnt\regedit.exe," & _
"c:\winnt\explorer.exe"

arrNames = Split(strNames, ",")
Wscript.Echo Ubound(arrNames) + 1

Set objTextFile = objFSO.CreateTextFile("IT-DBAdmin_Jet_40_SP8_files.txt")

Do While NOT Ubound(arrNames) = ""

Wscript.Echo "(regedit.com)...(" & _
objFSO.GetFileVersion("c:\winnt\regedit.exe") & ")" & _
objFSO.FileSize("c:\winnt\regedit.exe") & ")"

Wscript.Echo "(explorer.exe)...(" & _
objFSO.GetFileVersion("c:\winnt\explorer.exe") & ")" & _
objFSO.FileSize("c:\winnt\explorer.exe") & ")"

Loop

objTextFile.Close
'---------------------------------------------------------------------------

And of course it doesn't work. I would *like* to set up an array of the
filenames I want info on, then cycle thru them until the list is finished. I'd
*also* like to write this info out to a file.

You can see that I have "pieces", just not the whole thing, plus my DO loop
isn't good. And my 'objFSO.FileSize' doesn't work as well. (Geez. But hey, I
only started with this wmi scripting about 2 hours ago... Really.) If i can't
cycle thru an array of the names I need, how would I set a path, so I cane save
some typing? (Since a lot of these are in the same place, such as
"C:\Winnt\system32".)

If anyone could "fill in the gaps", or point me to some where I might find what
I'm after, I'd appreciate it.

Thanks in advance,

Tom
.



Relevant Pages

  • rotate revisited
    ... Suppose we have an array A containing n equi-spaced elements. ... The cost of this method (excluding loop costs) is: ... Each cycle is of length n/d. ... I will use the term "small slide" for a data move that is less ...
    (comp.programming)
  • Re: trouble backup with perl.
    ... >> I'm experiencing to write a perl script for to make backup with afio ... This is a very inefficient loop, ... > whole file to an array and then loop over the array. ... >> Pleeese help I need backup. ...
    (perl.beginners)
  • Re: COBOL myth busted, index versus subscript (MF on HP)
    ... curious about an array without an index defined, ... So, Question, what is exit perform cycle? ... When I first ran the test, the null loop was empty. ...
    (comp.lang.cobol)
  • Re: problem with Wscript.createObject
    ... When 'auto maker' did the "Guiness record " for a car uninterruptedly ... I can imagine that NT also rather likes to handle a restarted script (after ... > the script will run over days (there is a big loop inside, ... > each cycle takes about 20 minutes) The script run fine for the ...
    (microsoft.public.scripting.wsh)
  • Re: Scalable method for searching in relatively big files
    ... directly in the file A each line for the while loop, ... it would interfer with the search if I used the array @a for the while ... So it isn't a scalable solution in my opinion. ... Show us your script, and someone here will be able to help. ...
    (comp.lang.perl.misc)