crossposted to the windows.server.scripting newsgroup
--
Peter
Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.
"Ricardo Ito" <> wrote in message
news:19939896-4161-4C03-AED2-...
> Hi.
> I found some scripts and I try to merge and the result was:
>
> --
> strComputer = "mycomputer"
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\cimv2")
>
> Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
> ("SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE " _
> & "TargetInstance ISA 'CIM_DataFile' and " _
> & "TargetInstance.Name='c:\\temp\\text.txt'")
>
> Do
> Set objLatestEvent = colMonitoredEvents.NextEvent
> Set objEmail = CreateObject("CDO.Message")
> objEmail.From = ""
> objEmail.To = ""
> objEmail.Subject = "The growth of the file"
> objEmail.Textbody = "The file is growing!!!"
> objEmail.Send
> Loop
> --
>
> but I would like the oposite...
> When the file "text.txt" doesn´t grow, send a e-mail.
|