Wildcard |
Definition |
Example |
---|---|---|
* |
Any number of characters. This wildcard is used in following scenarios:
|
C:\*.log will filter all files with the .log extension on root of the C drive. If you want to filter files with the .log extension from a folder on the C drive, you must include the path to the folder in the filter. (for example, C:\Test\*.log) ntuser* will filter all files for which the file name starts with the word ntuser. C:\Finance\Test\* will filter only the files in the "Test" folder under the "Finance" folder on the C drive. Any sub-folders under the "Test" folder will get backed up. C:\* will filter all files located on root of the C drive. |
** |
All files and folders under a specific directory All files and folders under a specific drive |
C:\Test\Data\** will filter all files and subdirectories under and including C:\Test\Data C:\**\Data\** will filter all files and subdirectories below and including any directory called "Data" at any level in the C: volume G:\Users\**\xpprofile\*.log will filter all files with the .log extension from any xpprofile subdirectory under Users directory G:\Users\**\xpprofile\ntuser* will filter all filenames starting with ntuser from any xpprofile subdirectory under Users directory C:\** will filter all the directories located on C drive C:\**\* will filter all the files and directories on C drive |
? |
Any one character This wildcard can be used to filter following files or folders: All files (or folders) for which any one character in the file name or the folder name is variable. |
To filter files: C:\access?.doc will filter any files with the extension .doc on the C drive for which the name begins with- "access" followed by any one character such as access1.doc or access5.doc. However, access12.doc or access15.doc will not be filtered because the last two characters in the name are variable. To filter access12 or access15, you must specify access?? in the subclient filters. To filter folders: Class?report will filter any folder for which the character in the place of ? is variable. For example: Class1report and Class2report will be filtered. However, Class15report will get backed up. |
[ ] |
Set or range of characters. |
C:\[a-m]*.doc will filter any file with .doc extension on the C drive for which the name begins with the letters "a" through "m”. C:\[AEIOU]*.doc will filter any file name that ends with .doc and begins with the letters A, E, I, O, or U. If you want to treat [] as literal characters and not as wildcards, you must use a special syntax. This will be useful when you want to filter a file which has [] in the file name. The special syntax allows you to define an escape character. Each character immediately following the escape character will then be treated literally and not as a wildcard. For example: You want to filter a file with the name report[finance].doc on the C drive. In order for the square brackets to not be treated as wildcards, you must define an escape character. In the following example, the escape character is defined as the apostrophe (‘). The "e=" syntax is used to define the escape character. Since the square brackets are to be treated as literals, they both must be preceded by apostrophes. The filter 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. To filter a file with the name Test[Report]’2011’Financials.doc on the C drive, the following syntax should be used: <P:e=’>C:\Test’[Report’]’’2011’’Financials.doc |
[!] |
The negation of a set or range of characters. You can use the wildcard in following scenario: Filter 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 will filter all .doc files in the C:\Windows directory that start with a letter other than A, E, I, O, or U. |
×