It is parsing the output again with the second For command to tidy it up

---Blackberried

-----Original Message-----
From: David Lum <david....@nwea.org>
Date: Fri, 25 May 2012 17:50:39 
To: NT System Admin Issues<ntsysadmin@lyris.sunbelt-software.com>
Reply-To: "NT System Admin Issues" 
<ntsysadmin@lyris.sunbelt-software.com>Subject: RE: Is there a way...

OK thanks. How is it not picking up the "bytes" or "time" instead?

From: Rankin, James R [mailto:kz2...@googlemail.com]
Sent: Friday, May 25, 2012 10:27 AM
To: NT System Admin Issues
Subject: Re: Is there a way...

Yes, The specified delimiter is an = sign. You can specify the delimiter or use 
the default (is the default a space?)

You can echo the output out if you want to check what you're picking up
---Blackberried
________________________________
From: David Lum <david....@nwea.org<mailto:david....@nwea.org>>
Date: Fri, 25 May 2012 17:04:47 +0000
To: NT System Admin 
Issues<ntsysadmin@lyris.sunbelt-software.com<mailto:ntsysadmin@lyris.sunbelt-software.com>>
ReplyTo: "NT System Admin Issues" 
<ntsysadmin@lyris.sunbelt-software.com<mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Is there a way...

The MAP-WS.txt is the data collection point

How the heck does that tokens line work? I get that it is stepping through the 
"Reply from 4.2.2.3: bytes=32 time=24ms TTL=53" line, but how the hell is it 
picking out the 5th entry and dropping off "time=" part? Is that what the 
delims line is doing?

Dave

From: Crawford, Scott 
[mailto:crawfo...@evangel.edu]<mailto:[mailto:crawfo...@evangel.edu]>
Sent: Thursday, May 24, 2012 4:15 PM
To: NT System Admin Issues
Subject: RE: Is there a way...

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:david....@nwea.org]<mailto:[mailto:david....@nwea.org]>
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:mich...@smithcons.com]<mailto:[mailto:mich...@smithcons.com]>
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:david....@nwea.org]<mailto:[mailto:david....@nwea.org]>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
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 listmana...@lyris.sunbeltsoftware.com
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 listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to