Thanks
I've now taken another approach, I'm using log parser to evaluate the logs.
What I'm doing is running an external batch file with this as the content:
"C:\Program Files\Log Parser 2.2\LogParser.exe" -i:EVT -o:NAT "SELECT Message FROM System WHERE EventID IN (133) AND Sourcename LIKE 'Removable Storage Service' AND TimeWritten >= SUB( TO_LOCALTIME(SYSTEM_TIMESTAMP()), TIMESTAMP('0000-01-02', 'yyyy-MM-dd') )"
and calling it with pipe (). I would though like to have it incorporated all in kixtart but I've had real difficulties because the speech marks are not getting passed correctly when the line is passed to pipe().
I'm then parsing the content for strings using a line like this:
$listing = pipe('$call')
For Each $file In $listing
;locate $
if instr($file,"requires cleaning")
$clean=1
endif
Next
Darren
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.