sekhar
Thu May 17 06:35:01 CDT 2007
Thank you very much for a good cool script.
"Ayush" <"ayushmaan.j[aatt]gmail.com" wrote:
> [sekhar]s message :
> > Hi all, I need to write a vbscript to search a string value in a text log
> > file. If the string value is present, it will send an email. I know the
> > script for sending the email.
>
> > Please someone help me for searching a log file.
>
> file="filepath"
> search="xxx"
>
> Set fs = CreateObject("Scripting.FileSystemObject")
> Set filestr = fs.OpenTextFile(file, 1)
> If InStr(filestr.ReadAll,search) Then msgbox "Found"
> filestr.Close()
>
>
> Good Luck, Ayush.
> --
> Scripting Home :
http://snipurl.com/Scripting_Home
>