Jump to content

Batch Scripting Clamav Scanner


m3rlin

Recommended Posts

Hello!

I just build and I want to sharing file batch scripting ClamAV Scanner determine to easier for using ClamAV.

 

I build two script:

1. freshclam.bat

2. clamav-scanner.bat

 

Okay, this is my script:

 

1. file freshclam.bat

@ECHO OFF
TITLE CLAMAV VIRUS SIGNATURE UPDATER
cmd /c freshclam.exe -v
ECHO ------------------------------
PAUSE

2. file clamav-scanner.bat

@ECHO OFF
TITLE CLAMAV ANTIVIRUS SCANNER
SET /P scan=Please enter path to scan: 
IF "%scan%"=="" GOTO Error
ECHO Scanning path: %scan%
ECHO Please wait for a moment...
cmd /c clamscan.exe -r -i "%scan%" --move=C:\ClamAV-x64\quarantine --log=logs.txt
ECHO ----------------
GOTO End
:Error
ECHO You didn't enter path...
:End
PAUSE

Look line 7, that's syntax for quarantine virus and create logs.txt file.

 

Tips:

Run as administrator if UAC (User Account Control) is enable

 

Hope this help!

 

Regards, m3rlin

Link to comment
Share on other sites

Hello m3rlin, there is a ClamAV-users mailing list that you can subscribe to besides posting here at the Immunet forum. That way you can share your findings with other like minded individuals & have access to the ClamAV archives as well.

 

If you would like to subscribe here is a link.  http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users

 

Best wishes, Ritchie...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...