Why are you using MAP-WS_Results.txt? Just as a data collection point or do you
possibly need more info from it later besides the 4 things you mention? If the
only thing you want at the end is your master list in a text file, I would
parse the data during each command. Something like this, maybe?
for /f "tokens=1-5" %%i in ('FILEVER
"%SystemRoot%\system32\Macromed\Flash\Flash*.ocx"') do set FlashVersion=%%m
for /f "tokens=1-7 delims== " %i in ('ping -n 1 4.2.2.3 ^| find /i "reply"') do
set PingTime=%o
echo %ComputerName%,%FlashVersion%,%PingTime%
From: David Lum [mailto:[email protected]]
Sent: Thursday, May 24, 2012 4:47 PM
To: NT System Admin Issues
Subject: RE: Is there a way...
CMD only.
Sorry I should have included more info. The commands I am already running are:
FILEVER "%SystemRoot%\system32\Macromed\Flash\Flash*.ocx" /A /D >>
"b:\wsdata\MAP-WS_Results.txt"
Echo. >> "b:\wsdata\MAP-WS_Results.txt"
ping -n 1 4.2.2.3 | find /i "reply" >> "b:\wsdata\MAP-WS_Results.txt"
So what you saw was the contents of MAP-WS_Results.txt.
Ultimately I'm looking to have say, 50 machines run that batch file and end up
with something like this in a .TXT/.CSV
***
Machine name, OS, Flash version, ping
JOEBOB-XP, Windows XP, 11.2.202.235,24ms
MARYLOUWIN7,Windows 7,10.0.1,23ms
***
From: Michael B. Smith
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Thursday, May 24, 2012 2:13 PM
To: NT System Admin Issues
Subject: RE: Is there a way...
BAT/CMD only? Or is PowerShell an option?
From: David Lum [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Thursday, May 24, 2012 5:08 PM
To: NT System Admin Issues
Subject: Is there a way...
In batch to take this output:
---
W32i DLL ENU 11.2.202.235 shp flash32_11_2_202_235.ocx
Reply from 4.2.2.3: bytes=32 time=24ms TTL=53
---
And end up with this in a .TXT file?
---
11.2.202.235 , 24ms
---
I'm wondering if a FOR loop can be leveraged?
David Lum
Systems Engineer // NWEATM
Office 503.548.5229 // Cell (voice/text) 503.267.9764
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin