You can use wildcard characters to define patterns for subclient content and filters. If the subclient content consists of wildcard characters and no eligible files are found for backup, then the backup operation will complete successfully even though no files were backed up.
The following table describes how to use wildcard characters when you define the subclient content or filters:
Wildcard Character |
Description |
Examples |
---|---|---|
<MR>. |
<MR> followed by any extension would filter out the files with the same name as extension and not the folder |
|
* |
Matches any number of characters. Used to match all objects This wildcard is used in following scenarios:
|
*.doc backs up all files with the extension .doc (e.g., status.doc, mission.doc) on all drives on the client computer. C:\Test\*.doc backs up all .doc files only in the C:\Test\directory. a*.dll backs up all files with the extension .dll (e.g., alsvc.dll, advdcc.dll) on the client computer thar has the name beginning with the letter "a". C:\Finance\Test\* backs up only the files in the Test folder under the Finance folder on the C: drive. Any sub-folder under the Test folder will not be backed up. |
** |
Matches any directory level |
C:\**\move.cpp - includes the file named move.cpp located at any directory level under the C: drive. (e.g., c:\info\com\move.cpp) C:\sys*\** - includes all folders and files under C: drive that start with sys. All the sub-folders and files under these folders are also included in the backup. |
? |
Matches any one character Used to match all files (or folders) for which any one character in the file name or the folder name is a variable. |
access? backs up any folder or file on the C: drive for which the name begins with- access followed by any one character such as access1 or access5. However, access12 or access15, for example, will not be backed up because the last two characters in the name are variables. To back up access12 or access15, you must specify access?? in the subclient content. Class?report backs up any folder or file for which the wildcard character in the place of ? is a variable. For example: Class1report and Class2report are included in the backup. However, Class15report is excluded from backup. |
[ ] |
Matches a set or range of characters enclosed in square brackets. |
Numbers within square brackets are treated as single digits, and a dash between two digits indicates the complete range of numbers between those two digits. For example, test[1-5].txt backs up all files test1.txt, test2.txt, test3.txt, test4.txt, and test5.txt. test1[0-9][0-9][0-9].txt backs up all files starting from test1000.txt to test1999.txt. To back up files test 10 to test 39, enter test[1-3][0-9]. If you enter [10-39], it would back up test1, test0, test3, and test9. If you want to treat [] as literal characters and not as wildcards, you must use the special syntax. This is useful when you want to include a file that has brackets ( [] ) in the file name. The special syntax allows you to define an escape character. Each character immediately follows the escape character is treated literally and not as a wildcard character. For example, you want to back up a file with the name report[finance].doc on the C: drive. To avoid treating the square brackets as wildcard characters, you must define the escape character. In the following example, "e=" syntax is used to define the escape character as the apostrophe (‘). The square brackets must be treated as literals and must be preceded by apostrophes. The content entry in the subclient should look like this: <P:e='>C:\report'[finance'].doc Any character can be used as the escape character, as long as it is defined after the “e=” in the syntax and it precedes any character that is to be treated as a literal. In addition, the escape character can itself be used as a literal. This can be achieved by prefixing it with another escape character.
|
[ ! ] |
Matches any single character that is not in the listed set or range of characters. You can use the wildcard in following scenario: Backs up all files in a directory except the files for which the name starts with any character from the specified set or range of characters. |
C:\Windows\[!AEIOU]*.doc would backup all .doc files in the C:\Windows directory that start with a letter other than A, E, I, O, or U. |
Keep in mind that the path entered for the subclient filter is based on what level is being filtered out. The examples provided below illustrate this point:
-
To filter out a root folder called "Sent Items", specify the name of the folder and the asterisk "*" wildcard with no delimiters, as shown in the following example:
Sent*
-
To filter out a subfolder called "test", specify the full path including the leader "\", as shown in the following example:
Sent Items\test*
-
To filter out any path that ends in a folder name, use the full path including the leader "\" and the asterisk "*" wildcard for the first level, as shown in the following example:
*\test*
-
To filter all directories that begin with a particular word on all drives (e.g. My_Filter), use the global filter:
*:\**\My_Filter*\**
- If you know the drive letter to filter, use the subclient filter as follows:
C:\**\My_Filter*\**
- To filter every directory named "temp" on all drives, use the global filter:
*:\**\temp\**
- Or use the subclient filter:
C:\**\temp\**
- To filter every "recycler" directory on all drives, use the global filter:
*:\**\RECYCLER\**
- Or use the subclient filter:
C:\**\RECYCLER\**
Do not use "temp*" when all you want to filter is temp, as it will get "template" and other directories with word "temp".