@ECHO OFF cls pushd %~dp0 set check_days=5 set cdy=%date:~7,2% set cmo=%date:~4,2% set cyr=%date:~10,4% set edychk1=- set edychk2=0 @ECHO Start date: %cyr%-%cmo%-%cdy% findstr /C:"[SETI@home] Scheduler request failed: " stdoutdae.txt >sched_failures-%computername%.txt findstr /C:"[SETI@home] Scheduler request failed: Timeout was reached" stdoutdae.txt >sched_failures_timeout-%computername%.txt findstr /C:"[SETI@home] Scheduler request completed: " stdoutdae.txt >sched_successes-%computername%.txt :start set /a lct=%lct%+1 findstr /C:"%cdy%-" sched_failures-%computername%.txt >sched_failures-%computername%_%cyr%-%cmo%-%cdy%.txt findstr /C:"%cdy%-" sched_failures_timeout-%computername%.txt >sched_failures_timeout-%computername%_%cyr%-%cmo%-%cdy%.txt findstr /C:"%cdy%-" sched_successes-%computername%.txt >sched_successes-%computername%_%cyr%-%cmo%-%cdy%.txt REM ---start output senction for /f %%a in ('Find /V /C "" ^< sched_failures-%computername%_%cyr%-%cmo%-%cdy%.txt') do set fails=%%a for /f %%a in ('Find /V /C "" ^< sched_failures_timeout-%computername%_%cyr%-%cmo%-%cdy%.txt') do set time_fails=%%a for /f %%a in ('Find /V /C "" ^< sched_successes-%computername%_%cyr%-%cmo%-%cdy%.txt') do set success=%%a set /a schdreqcnt=%fails%+%success% @ECHO Results for calendar date: %cyr%-%cmo%-%cdy% @ECHO Scheduler Requests: %schdreqcnt% set /a schdsuccesspct=%success%*100/%schdreqcnt%*100/100 @ECHO Scheduler Success: %schdsuccesspct% %% set /a schdfailspct=%fails%*100/%schdreqcnt%*100/100 @ECHO Scheduler Failure: %schdfailspct% %% set /a schdtofailspct=%time_fails%*100/%schdreqcnt%*100/100 @ECHO Scheduler Timeout: %schdtofailspct% %% of total set /a schdtmfailspct=%time_fails%*100/%fails%*100/100 @ECHO Scheduler Timeout: %schdtmfailspct% %% of failures REM ---end output senction set /a cdy=%cdy%-1 if %cdy:~0,1%==%edychk1% @ECHO Date makes no sense. I Can't math! & goto end if %cdy:~0,1%==%edychk2% @ECHO Date makes no sense. I Can't math! & goto end if %lct%==%check_days% goto end goto start :end @ECHO End date: %cyr%-%cmo%-%cdy% del sched_*-%computername%_*.txt pause