Specifying scanning exclusions for Windows

Standard naming conventions

Sophos Anti-Virus validates the paths and file names of scanning exclusion items against standard Windows naming conventions. For example, a folder name may contain spaces but may not contain only spaces.

Multiple file extensions

File names with multiple extensions are treated as if the last extension is the extension and the rest are part of the file name:

MySample.txt.doc = file name MySample.txt + extension .doc.

Excluding specific files, folders, or drives

Exclusion type

Description

Examples

Comments

Specific file

Specify both the path and file name to exclude a specific file. The path can include a drive letter or network share name.

C:\Documents\CV.doc

\\Server\Users\Documents\CV.doc

To make sure that exclusions are always applied correctly, add both the long and 8.3-compliant file and folder names:

C:\Program Files\Sophos\Sophos Anti-Virus

C:\Progra~1\Sophos\Sophos~1

For more information, see knowledgebase article 13045.

All files with the same name

Specify a file name without a path to exclude all files with that name wherever they are located in the file system.

spacer.gif

Everything on a drive or network share

Specify a drive letter or network share name to exclude everything on that drive or network share.

D:

\\Server\<sharename>\

When you specify a network share, include a trailing slash after the share name.

Specific folder

Specify a folder path including a drive letter or network share name to exclude everything in that folder and below.

D:\Tools\logs\

Include a trailing slash after the folder name.

All folders with the same name

Specify a folder path without a drive letter or network share name to exclude everything from that folder and below on any drive or network share.

\Tools\logs\

(excludes the following folders: C:\Tools\logs\, \\Server\Tools\logs\)

You must specify the entire path up to the drive letter or network share name. In this example, specifying \logs\ would not exclude any files.

Wildcards

You can use the ? and * wildcards.

Use the ? wildcard in a file name or extension to match any single character.

At the end of a file name or extension, the ? wildcard matches any single character or no characters. For example, file??.txt matches file.txt, file1.txt, and file12.txt, but not file123.txt.

Use the * wildcard in a file name or extension, in the form [file name].* or *.[extension]:

Correct

file.*

*.txt

Incorrect

file.txt*

file.*txt

There is also a possibility to exclude files with a specific beginning and extension:

file*.txt

The above example excludes the following files from scanning:

file.txt

file1.txt

file12.txt

file.1.txt

file.12.txt

file12.12.txt

The following files are not excluded by applying the exclusion defined above:

file.1txt

file.12txt

file.txt1

file.txt12

1file.txt

1file.txt1