Jump to content
m3rlin

Batch Scripting Clamav Scanner

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

  • Like 1

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×