Jump to content


Photo

Batch Scripting Clamav Scanner


  • Please log in to reply
1 reply to this topic

#1 m3rlin

m3rlin

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 14 December 2017 - 11:22 AM

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


  • StevenNonraida likes this

#2 ritchie58

ritchie58

    Staff Member

  • Moderators
  • 2,038 posts
  • LocationEarth

Posted 16 December 2017 - 02:35 AM

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....fo/clamav-users

 

Best wishes, Ritchie...


* Immunet Global Forum Moderator *





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users