Link to home
Start Free TrialLog in
Avatar of rutgermons
rutgermons

asked on

finstr searching multiple log files in multiple folders

folks

how can I use the "findstr" command to search for a specific string in multiple sub folders
on a server?

the below works when looking at one file but I would like to view various log files for "bloggs"

outputting the log file name would also assist

hope anyone can assist
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rutgermons
rutgermons

ASKER

cool

so, in essence your main folder is called "base" right?

i addition is there  a switch that checks for the string after a certain timstamp in the logs?
Correct on "base", all files in that folder, and all subfolders of it will be searched.

FINDSTR can use regular expressions as search strings, but no easy way to use that to start a search after a date or time in the file.

~bp
Ok, lastly, is there a switch to be able to look at multiple servers?

i have the same log folder setup over different servers so such a switch could assist me in troubleshooting for specific errors

cheers
No, but just put several lines like the example in a BAT script and change the base folder as needed for each server.

~bp