This monitor script shows the total number of strings that match the search criteria.
This script builds on the excellent work done by Bronx:
...And aLTeReGo:
All coding was accomplished by Josh Monnot ()
Usage
It returns all lines that match the search criteria divided by ";".
SYNTAX: <drive>:\<dirpath>\<fileame> <searchpattern> <usage> <starting_position>
OPTIONS:
<searchpattern> can be straight text (banana), regex ("^(.*)(ERROR)(.*)$"), quoted or not.
<usage> can be:
"total" (all lines found from <position> to the end of the file)
"new" (all lines found since the last reading, in which case <position is ignored)
"match" (???)
<starting_position> is the character to start searching from. Only valid when used with "total" or "match"
Examples
- C:\GateESM\applogs.niftyprogram.log ^(.*)(ERROR)(.*)$ total 0
- \\SERVERABV\D$\temp\applogs.niftyprogram.log ^(.*)(ERROR)(.*)$ total 0
- \\mydomain.net\applications\oh001\PackingSlips\prod\errored\applogs.niftyprogram.log ^(.*)(ERROR)(.*)$ total 0