I am on Windows 7 Professional. I have the following files in C:\script.
clamav_daily_scan.bat
log_email_clamav_daily_scan.bat
email.vbs
log.txt
log_email_clamav_daily_scan.bat
@echo off
@echo set variables
SET DATETIME=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%%TIME:~9,2%
SET LOG_DIR="%PROGRAMFILES(X86)%"\ClamWin\bin\daily_scan\log
SET LOG_FILENAME=clamscanlog_%DATETIME%.txt
@echo start daily scan
C:\script\clamav_daily_scan.bat > %LOG_DIR%\%LOG_FILENAME%
@echo send result
C:\Windows\SysWOW64\cscript.exe C:\script\email.vbs %LOG_DIR%\%LOG_FILENAME%
When I execute log_email_clamav_daily_scan.bat on cmd, it only stop until start daily scan.
C:\script\log_email_clamav_daily_scan.bat
set variables
start daily scan