Hello,
Does anyone know how to parse an output file to strip out a string? I am
new to this and frustrated. Thanks in advance!!!
Kevin
Robert,
You found the flaw in my original solution. The down
devices are passed
to cmd as a space separated list of devices. Each would be
picked up as
%1 %2 ... The following will write the entire command line
to the output
file.
- Create a a bat file containing this command:
echo %CMDCMDLINE%>test.out
- Create a Program Notification:
o Program filename=yourfile.bat
o Program arguments= %d %t Down Devices: %e Devices with
down
services: %A
- Create a Recurring Notification that calls yourfile.bat.
Sample
Output: CMD /C "C:\Program Files\WhatsUp\test.bat"
11/26/2001 12:13:00
Down
Devices: host1.com host2.com Devices with down services:
host3 host5
Note: This method will write the entire command line to the
output file.
You will need to parse the output file to strip out the
following: CMD
/C "C:\Program Files\WhatsUp\test.bat"
Joe
Kevin Bartholomew
Computer Operations Analyst 2
Freightliner Corporate
503-745-5324
[EMAIL PROTECTED]
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/