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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...