Profile Management

Use wildcards

You can use DOS-style wildcard characters such as the question mark (?) and asterisk (*) in policies that refer to files and folders. Examples include file inclusion and exclusion lists and folder inclusion and exclusion lists. The question mark (?) matches a single character. The asterisk (*) matches zero or more characters.

Starting with Profile Management 7.15, you can use the vertical bar (|) to restrict the policy only to the current folder.

Be aware of the following:

  • Wildcards in file names work recursively while wildcards in folder names don’t. Ensure that you specify a valid path when using wildcards.

  • Policies that support wildcards do not support any other type of variable, such as the use of environment variables or Active Directory attributes. You cannot use wildcards in policies that refer to registry entries.

Examples

The wildcard <path name>\h*.txt matches house.txt, h.txt, and house.txt.txt, but does not match ah.txt.

The wildcard <path name>\a?c.txt matches abc.txt, but does not match ac.txt.

The wildcard <path name>\a?c*d.txt matches abcd.txt and abccd.txt, but does not match acd.txt.

Configuring policies in the profile root folder:

  • *.txt specifies all files with the extension .txt in the root folder and its subfolders.

  • *h.txt specifies all files that match this wildcard in the root folder and its subfolders.

  • h*.txt specifies all files that match this wildcard in the root folder and its subfolders.

  • a?c.txt specifies all files that match this wildcard in the root folder and its subfolders.

  • *.txt| specifies all files with the extension .txt only in the root folder.

Configuring policies in non-profile root folders:

  • AppData\*.txt specifies all files that match this wildcard in the AppData folder and its subfolders.

  • AppData\*h.txt specifies all files that match this wildcard in the AppData folder and its subfolders.

Use wildcards