Virus scan

Starting a scan of a certain area for viruses and processing malicious objects from the command prompt generally looks as follows:

SCAN [<scan object>] [<action>] [<file types>] [<exclusions>] [<report settings>]

Disk names must be specified in upper-case, for example C:/file.txt, where C – is the disk name.

Settings description:

<scan object> – this setting gives the list of objects that will be scanned for malicious code.

The setting can include several values from the list provided, separated by spaces.

<files>

List of paths to the files and/or folders to be scanned.

You can enter an absolute or relative path to the file. Items on the list are separated by a space.

Notes:

  • If the object name contains a space, it must be placed in quotation marks.
  • If you specify a concrete folder, all the files in it are scanned.

<disc_name>:/<folder>

Scan the specified disk where <disc_name> is the name of the disk, and <folder> is the path to the folder to be scanned.

<action> – this setting determines what action will be taken with malicious objects detected during the scan. If this setting has not been defined, the default action is the one with the value for -i8.

-i0

Take no action on the object; simply record information about it in the report.

-i1

Treat infected objects and if disinfection is impossible, skip.

-i2

Treat infected objects and if disinfection fails, delete. Do not delete infected objects from compound objects. Delete infected compound objects with executable headers (.sfx archives).

-i3

Treat infected objects and if disinfection fails, delete. Delete all compound objects completely if infected parts cannot be deleted.

-i4

Delete infected objects. Delete all compound objects completely if the infected parts cannot be deleted.

-i8

Prompt the user for action if an infected object is detected.

-i9

Prompt the user for action at the end of the scan.

<file types> – this setting defines the file types that will be subject to an anti-virus scan. If this setting is not defined, by default infected files are only scanned by content.

-fe

Scan only infected files by extension.

-fi

Scan only infected files by contents.

-fa

Scan all files.

<exclusions> – this setting defines objects that are excluded from the scan.

The setting can include several values from the list provided, separated by spaces.

-e:a

Do not scan archives.

-e:b

Do not scan email databases.

-e:m

Do not scan plain text emails.

-e:<filemask>

Do not scan objects by mask.

-e:<seconds>

Skip objects that are scanned for longer than the time specified in the <seconds> setting.

-es:<Container size limit>

Skip compound files which size (in MB) exceeds the value specified by the <Container size limit> parameter.

Example:

Run the scan of the Documents and Settings folder and the <D> disk:

SCAN D: “C:/Documents and Settings”

Virus scan