How to scan a file with avast antivirus

Learn how to perform an Avast Virus Scan on files automatically with JSCAPE MFT Server. This guide details the setup and implementation of a custom trigger action for virus scanning.
  1. Blog

This custom trigger action performs a virus scan against a file using Avast anti-virus software.

 Downloads

Source code and build instructions

How to scan a file using Avast

Let me now show you how to implement that.

1. Make sure you have already Avast installed in the server

Before creating a custom trigger action, you need to have  Avastanti-virus software installed in the server where JSCAPE MFT Server is running.

2. Create a Trigger for Avast Scan

Login into admin console of JSCAPE MFT Server > Triggers and ClickAddto create a Trigger

Give the trigger a Name and then select the File Upload event type from the drop-down list. 

avast-virus-scan-img1

ClickNextto Step 2 where a condition can be set to execute the trigger.

If no conditions requiredClick Next to proceed. 

The step 3 asks to add an action, Add the action"Avast Virus Scan" from drop down list. If the action not found read the build instructions (Source code and build instructions) .

ClickOKto proceed

avast-virus-scan-img2

The Parameters for the action "Avast Virus Scan" are ;

  • Location 
  • Arguments
  • Output Log

As the name indicates, Location is the path where "scan" process is located. Arguments represent the parameters needed for "scan" command line to work. Multiple arguments can be passed using comma separator. In order the scan the file during upload use the parameter as below;

-a,%LocalPath%

Output log is the file where all scan information will be written.

Click OKto save the settings

avast-virus-scan-img3

That's it. Now you know how to create a trigger to scan file on upload using Avast.