FWIW, although I still use the for command regularly, if you're unfamiliar with 
it you're probably better off trying to learn how to do these sorts of things 
in PowerShell, IMHO

---Blackberried

-----Original Message-----
From: "Crawford, Scott" <[email protected]>
Date: Fri, 25 May 2012 17:59:23 
To: NT System Admin Issues<[email protected]>
Reply-To: "NT System Admin Issues" 
<[email protected]>Subject: RE: Is there a way...

Its returning the 7th (%o) token at the end.

For /? has tons of good info.  I'd take a working line, like the one I gave 
you, study it against for /? and modify it to see what changes so you can get a 
good understanding of what's going on.

From: David Lum [mailto:[email protected]]
Sent: Friday, May 25, 2012 12:51 PM
To: NT System Admin Issues
Subject: RE: Is there a way...

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

From: Rankin, James R 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
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 <[email protected]<mailto:[email protected]>>
Date: Fri, 25 May 2012 17:04:47 +0000
To: NT System Admin 
Issues<[email protected]<mailto:[email protected]>>
ReplyTo: "NT System Admin Issues" 
<[email protected]<mailto:[email protected]>>
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:[email protected]]<mailto:[mailto:[email protected]]>
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:[email protected]]<mailto:[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]<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]<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

~ 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

Reply via email to