for /f "tokens=* delims= " %%a in ('dir /b/s D:\sba81\siebsrvr\log\*.log') do (
find "Error " < %%a >> Error.txt
for /f "tokens=* delims= " %%a in ('dir /b/s *.txt') do (
FINDSTR "2010-01-27 2010-01-26" "Error.txt"< %%a >> Error.log
first for loop in the batch file searches for all "error" keywords in all log files and in second loop i am using two dates as highlated in bold to filter the all errors to get only yesterday and today occured errors. For this i need to change the dates daily.
Can any one give me the solution how to include date command in the above batch file to search for yesterday's and today's errors?