findstr question
Posted: 07 Jul 2009 21:47
Hello all,
I am hoping for any advice on the findstr command, for the following scenario
I have a directory containing about 900 log files, far too many to check manually, x:\files\logs\pro
I am trying to complete a Batch Script that searches for the presence of the string "sorry.google" as part of the text in the log file.
An individual log file could potentially contain 0 or 100s of instances of the "sorry.google" string.
The hope is to produce a report containing the frequency of the string "sorry.google" followed by a hyphen, and the file name for each log file in the directory.
For instance:
11 - google.log
37 - yahoo.log
I am sure I will need the findstr command, and the /i flag.
I also think the "/d" is needed
Any advice?
thanks!
I am hoping for any advice on the findstr command, for the following scenario
I have a directory containing about 900 log files, far too many to check manually, x:\files\logs\pro
I am trying to complete a Batch Script that searches for the presence of the string "sorry.google" as part of the text in the log file.
An individual log file could potentially contain 0 or 100s of instances of the "sorry.google" string.
The hope is to produce a report containing the frequency of the string "sorry.google" followed by a hyphen, and the file name for each log file in the directory.
For instance:
11 - google.log
37 - yahoo.log
I am sure I will need the findstr command, and the /i flag.
I also think the "/d" is needed
Any advice?
thanks!