Writing a text file from within a script only if a candition is th
- From: cosimo <cosimo@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 16 Jul 2005 02:11:07 -0700
I've write a VB script that retrive all error events from Event Logs on the
local machine (by Win32_NTLogEvent) and write it to an output text file.
The script is scheduled to run every day at a specified time and retrive
only events occurred in the previous 24 hours.
Actually it open and write the output text file always, even if no error
events logs occurred (in this case the output text file is, obviously, empty).
The question is:
is there a way to open and write the output text file only if it is no empty
(if an error occurred) and in wich mode?
In this way, in fact, every day I'll check the local machine and only if
there was errors in the event logs in the previous day I'll find the output
text file without the needs to check and read an empty output text file.
Thanks in advance.
Cosimo MERCURO
.
- Follow-Ups:
- Re: Writing a text file from within a script only if a candition is th
- From: Ray Costanzo [MVP]
- Re: Writing a text file from within a script only if a candition is th
- Prev by Date: Difference Between Two Pages
- Next by Date: How to get long filename from short filename?
- Previous by thread: Difference Between Two Pages
- Next by thread: Re: Writing a text file from within a script only if a candition is th
- Index(es):
Relevant Pages
|