
22
VirusScan
®
Command Line 5.20.0 Product Guide
Using the Command-Line Scanner
Configuring scans
3
Configuring scans
Instead of running each scan with all its options directly from the command line, you
can keep the options in a separate text file, known as a
task file
. In the file, you can
specify the actions that the scanner must take when a virus is detected. This allows
you to run complete scans with ease, and at any time; you need only specify the files
or directories that you want to scan.
To configure a scan:
1
Choose the command options that you want to use.
See
Choosing the options
on page 25
for a description of available options.
2
Type the command options into a text editor just as you might on the command line.
3
Save the text as a file.
4
Type the following at the command prompt:
SCAN /LOAD
<FILENAME>
<TARGET>
Here, <
FILENAME>
is the name of the text file you created in steps
Step 2
and
Step 3
, and <
TARGET>
is the file or directory you want to scan.
If the scanner detects no virus infections, it displays no output.
To learn how to specify the options, see
Command-line conventions
on page 21
.
The following examples show how you can configure scans using task files. The
examples assume the scanner is available in the search path.
Example 1
To scan files in the
C:\WINDOWS
directory according to the settings you stored in the
task file
C:\TASKS\CONFIG1.TXT
, type the command:
SCAN /LOAD C:\TASKS\CONFIG1.TXT C:\WINDOWS
The contents of the file
C:\TASKS\CONFIG1.TXT
are:
/MOVE C:\VIRUSES /NOCOMP /MAXFILESIZE 4
They instruct the scanner to move any infected files to
C:\VIRUSES
, to ignore
compressed executables created with LZEXE or PkLite, and to examine only files
smaller than 4
MB
.
As an alternative, you can arrange the contents of the task file as single lines:
/MOVE C:\VIRUSES
/NOCOMP
/MAXFILESIZE 4