This article explains the rules for using wildcards when creating exclusions with MOVE AV Multi-Platform.
Using wildcards when creating exclusions
Wildcards (?, *, **) are helpful in creating exclusions, but certain rules apply. See the examples below.
- The question mark (?) wildcard is used to represent a single character in the exact position where it's placed in the path or file name.
- The asterisk (*) wildcard is used to represent one or more characters, and doesn't cross a folder boundary.
- The double asterisk (**) wildcard is used to represent one or more characters, and does cross folder boundaries.
- System Environmental Variables such as %SystemRoot% can be used in exclusions. User Environmental Variables such as %UserProfile% can't be used, because the on‑access scanner runs under the Windows Local System account.
To show the difference between the
* and
** wildcards,
C:\Users\Will* matches path names such as
C:\Users\William,
C:\Users\Willamina, and
C:\Users\WillAnderson. It doesn't match any subfolder of those names. For example
C:\Users\Will*\** matches the previous folders and all their subfolders.
Wildcard examples
Example |
Comments |
**\Temp\test.docx |
Exclude a specific file in a folder named Temp anywhere on the system. |
**\test.docx |
Exclude a specific file anywhere on the system. |
|
Exclude a specific file in any folder on a specific drive. The drive letter must be included in the wildcard.
In this example, any test.doc files on the D: drive are excluded: D:\**\test.doc
|
Users\**\Documents\Microsoft User Data\
|
Exclude any folder under Users and any folder under User Data.
|
C:\Documents and Settings\**\Favorites\
|
Exclude the Favorites folder for all users.
|
|
Exclude any folder named Favorites on drive C.
|
|
Exclude the Temp folder in any location, on any drive and any subfolders contained in the "Temp" directory.
In this example, the following directories would be excluded:
- C:\temp
- D:\windows\temp\Folder1
- c:\documents and settings\Administrator\Local Settings\temp
|
|
Exclude any file with a .tmp extension in a folder named Temp anywhere on the system.
|
|
Exclude any file with an .html extension anywhere on the system.
|
C:\Windows\Temp*\inifile?.* |
Excludes all files named inifileX, where X is any valid character for a file name. Exclude all files named inifileX in any folder name beginning with Temp under C:\Windows. |
D:\**\*.tmp |
Exclude all files with the .tmp extension (*.tmp) in any folder on a specific drive. The drive letter must be included in the wildcard.
In this example, any *.tmp files on the D: drive are excluded. |
C:\Temp\abc* or C:\Temp\abc*\ |
Exclude all file and folder names beginning with abc under C:\Temp.
NOTE: A single asterisk, independent of a backlash at the end, matches both file and folder names beginning with abc under C:\Temp. |
C:\Temp\abc*.* |
Exclude only file names beginning with abc under C:\Temp. |
C:\Temp\abc*\*.* |
Exclude only files of any extension in any folder name beginning with abc under C:\Temp. |
C:\Temp\abc*\xyz*.txt |
Exclude only files names beginning with xyz and with the txt extension, in any folder name beginning with abc under C:\Temp. |
C:\Temp\abc |
Exclude only a file named abc under C:\Temp. |
C:\Temp\abc\ |
Exclude only a folder named abc under C:\Temp. |