WINBATCH 37
DecCount.cmd Guest on 23rd August 2020 05:32:03 PM
  1. @ECHO OFF
  2.  
  3. ::WINDOW SIZE
  4. MODE CON: COLS=75 LINES=30
  5.  
  6. ::VARIABLES
  7. set /p REFRESH=Please enter refresh Rate in Seconds:
  8.  
  9. CLS
  10.  
  11. ::VARIABLES
  12. SET DCONS=C:\Smartermail\Declude\console.txt
  13. SET DCFG=C:\Smartermail\Declude\declude.cfg
  14. SET DHI=C:\Smartermail\Declude\hijack.cfg
  15. SET DTXT=C:\Smartermail\Declude\diags.txt
  16.  
  17.  
  18. SET PROC=C:\Smartermail\spool\proc
  19. SET REVIEW=C:\Smartermail\spool\proc\review
  20. SET DERR=C:\Smartermail\spool\proc\error
  21. SET HOLD2=C:\Smartermail\spool\spam\hold2
  22.  
  23.  
  24. FOR /F "TOKENS=2" %%A IN ('findstr /B "THREADS" %DCFG%') DO (SET PROCALERT=%%A)
  25.  
  26. :COUNT
  27. FOR /F "TOKENS=1" %%A IN ('DIR %PROC% ^|FIND /i "file(s)"') DO (SET PROC_TOTAL=%%A)
  28. ECHO Total Files in PROC = %PROC_TOTAL%
  29.  
  30. IF %PROC_TOTAL% GEQ %PROCALERT% color 4f
  31. IF %PROC_TOTAL% LSS %PROCALERT% color 07
  32.  
  33. FOR /F "TOKENS=1" %%B IN ('DIR %REVIEW% ^|FIND /i "file(s)"') DO (SET REVIEW_TOTAL=%%B)
  34. ECHO Total Files in REVIEW = %REVIEW_TOTAL%
  35.  
  36. FOR /F "TOKENS=1" %%C IN ('DIR %DERR% ^|FIND /i "file(s)"') DO (SET ERROR_TOTAL=%%C)
  37. ECHO Total Files in ERROR = %ERROR_TOTAL%
  38.  
  39. FOR /F "TOKENS=1" %%D IN ('DIR %SPOOL% ^|FIND /i "file(s)"') DO (SET SPOOL_TOTAL=%%D)
  40. ECHO Total Files in SPOOL = %SPOOL_TOTAL%
  41.  
  42. FOR /F "TOKENS=1" %%E IN ('DIR %HOLD2% ^|FIND /i "file(s)"') DO (SET HOLD2_TOTAL=%%E)
  43. ECHO Total Files in HOLD2 = %HOLD2_TOTAL%
  44.  
  45. ECHO.
  46.  
  47. FOR /F "TOKENS=1" %%A IN ('FINDSTR /i "Spam:" %DCONS%') DO (SET CHECk=%%A)
  48. IF %CHECK% LSS 100 ECHO [Processed = %CHECK%] *Decludeproc has recently restarted
  49. IF %CHECK% GTR 101  ECHO [Processed = %CHECK%]
  50.  
  51. FOR /F "TOKENS=3" %%A IN ('FINDSTR /i "Spam:" %DCONS%') DO (SET CHECk1=%%A)
  52. ECHO [Spam = %CHECK1%]
  53.  
  54. FOR /F "TOKENS=5" %%A IN ('FINDSTR /i "Spam:" %DCONS%') DO (SET CHECk2=%%A)
  55. ECHO [Virus = %CHECK2%
  56.  
  57. ECHO.
  58.  
  59. FOR /F "TOKENS=*" %%A IN ('FINDSTR /i "Time:" %DCONS%') DO (ECHO %%A)
  60.  
  61. ping 127.0.0.1 -n %REFRESH% >NUL
  62.  
  63. CLS
  64.  
  65. GOTO COUNT

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.