Im writing an AV scan script that supposed to use at least 3 engines this script suppose to check if a2cmd run (0/1) and if not it need to start Clamscan scan for some reason i cant get trough the first if
script
@setlocal enableextensions
@setlocal ENABLEDELAYEDEXPANSION
@cd /d "%~dp0"
set d=%date:/=.%
set d=%d: =_%
set t=%time::=-%
set t=%t: =%
set CurrentDate=%d%[%t%]
SET WinVer=7andup
set scantype=all
set Clam=1
set a2cmd=0
:laststand
if "%a2cmd%"=="0"(
IF true "%WinVer%"=="7andup"(
if true "%scantype%"=="all"(
wmic logicaldisk list brief | findstr "\<3\>" | findstr : > C:\av\LOGS\%CurrentDate%\PartitionlistTemp.txt
for /f "tokens=1" %%a in (C:\av\LOGS\%CurrentDate%\PartitionlistTemp.txt) do call :drivescans_XP %%a
goto fin_XP
:drivescans_XP
set Dirpath=%1
set Dirpath=%Dirpath::=%
echo Clamscan %Dirpath%
goto :eof
:fin_XP
)
echo Clamscan
)
)
pause
================================================
thank you for helping :)
Aucun commentaire:
Enregistrer un commentaire