Michael,

 

Thanks for the suggestion.

 

I did look at ClamWin, a while back, but from what I remember, updates are
slow in coming. I'll take a another look at it. There was another reason why
I opted for ClamAV but I do not recall. Also, I already have ClamAV
installed, clamd running as a service, custom configured with extra
signatures and auto updating.

 

I want to use a batch file because I want my FTP server to trigger the scan,
automatically, when files are uploaded.

 

Below is all I have found for Windows:

 

.

@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

.

 

How do I tweak the code above so that the command below is used if a virus
is found:

 

.

SwithMail.exe /s /x "SwithMailSettings.xml"

. 

 

If I use SwitchMail, I can have it use logs.txt as the body of the email
alert.

 

Thanks,

 

Jeff

 

--

 

From: clamav-users [mailto:clamav-users-boun...@lists.clamav.net] On Behalf
Of Michael Da Cova
Sent: Tuesday, September 18, 2018 3:11 AM
To: clamav-users@lists.clamav.net
Subject: Re: [clamav-users] Batch file for Windows.

 

Hi Jeff

have you looked at clamwin? http://www.clamwin.com/


Michael 

On 18/09/18 02:44, Jeff wrote:

Guys and Gals,

 

I've been unsuccessful in creating  a working batch file. I've Googled and
searched the ClamAV list but only found one incomplete sample.

 

Can someone share a Windows batch file or PowerShell script that does the
following:

 

When ran, recursively scans a particular directory, moves any infected files
to another directory and emails an alert if a virus is detected. The email
alert should contain info about the infected file(s) including the path.

 

Keeping fingers crossed :-)

 

Thanks,

 

Jeff

 

--

 






_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
 
 
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
 
http://www.clamav.net/contact.html#ml

 

_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to