Findstr but ignore if specific one found

November 25, 2019 at 05:49:46
Specs: Windows Server
I'm trying to find error codes in a log file but if one that is okay has been found, ignore it and only save results into a file for others found.

(i.e. ERRORCODE: 10001) ignore this one
ERRORCODE: 10606) save result to text file

Thx,
Brian


See More: Findstr but ignore if specific one found

Reply ↓  Report •

#1
November 25, 2019 at 11:59:12
If the log file could be imported into Excel, I'm pretty sure that a fairly simple macro would get you the results you are looking for. If that is something that your would consider, let us know.

We would need some more info such as how the log file is laid out (e.g. what column contains the error code), what data related to the error code do you want extracted, etc.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •

#2
November 25, 2019 at 18:59:26
For batch, a two-level "find" might work:
find "ERRORCODE:"<source.log | find /v "ERRORCODE: 10001"

Reply ↓  Report •
Related Solutions


Ask Question