You can use wildcard characters to include or exclude groups of files.
To specify groups of files that you want to include or exclude, use the wildcard characters listed in the following table. This table applies to include and exclude statements only.
A very large include-exclude list can decrease backup performance. Use wildcards and eliminate unnecessary include statements to keep the list as short as possible.
Character | Function |
---|---|
? | The match one character matches any
single character except the directory separator; it does not
match the end of the string. For example:
|
* | The match-all character. For example:
|
\... | The match-n character matches zero or more directories. |
/... | The match-n character matches zero or more directories. |
[ | The open character-class character
begins the enumeration of a character class. For example:
|
– | The character-class range includes
characters from the first character to the last character specified.
For example:
This format should not be used to specify remote drives in an exclude statement. |
\ | The literal escape character. When used within a character class, it treats the next character literally. When used outside of a character class, it is not treated in this way. For example, if you want to include the ']' in a character class, enter [...\]...]. The escape character removes the usual meaning of ']' as the close character-class character. |
] | The close character-class character ends the enumeration of a character class. |
: | The drive separator character separates
a file specification. The character before the colon identifies
a drive letter. The characters after the colon identify file
specification or pattern. For example:
|
Incorrect | Correct |
---|---|
\\remote\*:\...\*.* | \\remote\*$\...\*.* |
\\remote\?:\...\*.* | \\remote\?$\...\*.* |
\\remote\*:\...\pagefile.sys | \\remote\*$\...\pagefile.sys |