Exclusions, electives and overrides

In this section:

Exclusions, electives and overrides can be specified to control the files that are synchronized by File Director. See also File sync controls.

Exclusions - exclude files and file types from being uploaded and downloaded. For example, temporary files are automatically excluded from synchronization and are not uploaded.

Electives - elect files to be synchronized on an individual basis. Elective files are visible to users but must be synchronized individually using the option from the File Director context menu or by double-clicking the required file. Electives are a way to avoid heavy network traffic. A good example is to make files over a certain size elective, and so they are not automatically synchronized.

Overrides - specify exceptions to exclusions and electives. For example, these can be used to overwrite the default exclusions.

When enabled, exclusions and electives are enforced across all map points regardless of map point synchronization policy. Changes are applied when the user logs into File Director

File Director 2020.3 introduced the Windows Client Policy Tool. It provides an expression builder tool that enables synchronization rules to be created following a simple workflow. Refer to Policy Tool Sync Rules.

Expressions

Expressions are used to define an exclusion, exclusion override, elective or elective override. The following table has a brief explanation of each keyword along with the supported operators and expected values.

There are no user-definable keywords in the expressions. If the client encounters a syntax error in an expression, a message is logged in the Windows event log and the default values are applied.

Keyword Description

Supported Operators

Expected Value

Size

The size of the file.

Example:

Size > 500MB

This expression will match files which are larger than 500MB in size.

<

<=

!=

=

=>

>

1KB

2MB

5GB

Created

The file created date. It is used to specify the date a file was created.

Example:

Created >= 2018-10-20

This expression will match files created on or later than October 20th, 2018.

<

<=

!=

=

=>

>

YYYY-MM-DD

Age

The age is the last modified date for the file. It is used to specify the period between the current date and the date the file was last modified - in days, months or years (D, M or Y).

Example:

Age > 1Y

This expression will match files which have last been modified over 1 year ago.

<

<=

!=

=

=>

>

2D

3M

1Y

Path

The specified regular expression is used to compare against the full path of any files or folders.

The regular expression is case sensitive by default, if you wish to perform a case insensitive match then specify the i flag.

This keyword is ideal to use when you wish to match files or folders that belong to a subdirectory of a particular folder but you do not know the absolute path to the folder. If you know the absolute path to the folder, consider using the BENEATH keyword. If you would like to specifically match based on a folder or file name, irrespective of location on the machine, then consider using the NAME keyword.

Example:

PATH == /.*\\LocalFiles\\.*/.

This matches a path that contains \LocalFiles\.
The optional i flag for case sensitivity has not been specified, so this will match any files or sub-folders within a folder called LocalFiles. It will not match files or sub-folders within a folder called Localfiles or localfiles.

Note: support for environment variables in Path based expressions was introduced in File Director 2021.1. In earlier versions, environment variables are NOT supported and will not be expanded.

==

!=

/<regex>/i

/<regex>/

Name

The specified regular expression is used to compare against the name of files or folders.

The regular expression is case sensitive by default, if you wish to perform a case insensitive match then specify the i flag.

This keyword should be used when you wish to match files or folders based on their name regardless of their path. If you wish to match files or folders based on their full path or from a specific subdirectory for example, then the PATH keyword is recommended.

Example:

Name == /Windows10.iso/i

This matches a file called Windows10.iso in any location, it will also match windows10.iso because the i flag has been specified.

Note: support for environment variables in Name based expressions was introduced in File Director 2021.1. In earlier versions, environment variables are NOT supported and will not be expanded.

==

!=

/<regex>/i

/<regex>/

Ext

The extension of the file. Multiple extensions can be added, space delimited.

Example:

Ext In [dll exe msi]

This expression will match the extensions dll, exe and msi

In

NotIn

/<regex>/i

/<regex>/

Type

The type of object. This can be file or directory. It does not use any metadata to determine the type.

It is recommended to use this variable in conjunction with other variables when defining expressions.

Example:

Size > 10GB AND Type == File

This expression will match all files larger than 10GB

==

!=

File

Directory

Beneath

Matches files and folders beneath specified path. An absolute path is required, regular expressions are not supported. Any environment variables provided in the path are expanded.

Example:

BENEATH == "%USERPROFILE%\Favorites" OR BENEATH == “%USERPROFILE%\Links”

This expression will match all files and sub-folders within the specified folders

==

“<path>”

Exclusions

File policy exclusions enable control over file synchronization. When you configure exclusions, they are applied to new files only. Any existing synchronized files or folders that match a new exclusion, will continue to be synchronized.

An expression can be defined using variables such as path, file type, age. If files/folders are found which match a configured expression, they will not be uploaded by the client. Also, any remote files or folders which match an exclusion, will not be displayed in the folder listing.

Exclusion locations

Set exclusions in the following locations:

HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions

HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions

HKCU settings take precedence over HKLM settings.

Default values

File Director includes a default exclusion expression that prevents temporary, partial, and other files that are unlikely to be required from being synchronized. If you use In-location Sync to select an entire user profile to be managed by File Director, the following locations in the profile are ignored by default to save bandwidth and storage:

The AppData directory

The user’s registry files such as NTUSER.DAT

OneDrive

Junctions. For example, Links, Favorites, or Printer Shortcuts

Using the standard exclusions language you can specify additional locations in a user profile to be ignored. For example, if installed, you may want to exclude the Dropbox folder.

Default exclusions are always applied unless they are explicitly overridden. See Exclusion overrides below.

Exclusion Description
Ext In [tmp partial crdownload part download] All files ending with .tmp and temporary download files from common browsers (Chrome, Firefox and Safari)
Name == /~\$.*/) Office backup files starting with ~$
Name == /[0-9A-F]{8,8}/ Excel temp files
Name == /.*~/ Files which end with tilde ~
Name == /\.~lock.*#?/i Temporary Office lock files
Name == /NTUSER.DAT.*/i User profile settings
Name == /NTUSER.POL.*/i Registry policy archive file
Name == /NTUSER.INI/I Roaming user profile settings
BENEATH == "%USERPROFILE%\AppData" AppData directory

BENEATH == "%USERPROFILE%\OneDrive"

Default OneDrive location

BENEATH == "%USERPROFILE%\Favorites"

Favorites directory

Exclusion overrides

To override an exclusion, create an override entry in one of the following locations:

HKCU\Software\AppSense\DataNow\FilePolicy\ExclusionOverrides

HKLM\Software\AppSense\DataNow\FilePolicy\ExclusionOverrides

Overrides use the same language as exclusions.

Electives

Electives are associated with automatic map points. If a file is identified by an elective expression it will not be automatically downloaded to the endpoint. Electives enable administrators to control what files are synchronized to user endpoints by default. A typical use-case is to elect file types that the user is not expected to use. Elective files can be downloaded by the user on demand, but excluding them by default can help protect disk space and/or bandwidth.

The approach used to define exclusions also applies to defining electives.

Elective locations

Set electives in the following locations:

  • HKCU\Software\AppSense\DataNow\FilePolicy\Electives
  • HKLM\Software\Appsense\DataNow\FilePolicy\Electives

Elective Overrides

By default, there are no electives configured. You can specify an elective override if required, once you have an elective configured. Elective overrides use the same syntax and logic as exclusions, exclusion overrides and electives.

Elective Override locations

Set elective overrides in the following locations:

HKCU\Software\AppSense\DataNow\FilePolicy\ElectiveOverrides

HKLM\Software\AppSense\DataNow\FilePolicy\ElectiveOverrides

HKCU settings take precedence over HKLM settings.

Related topics

Windows Client Policy Tool

File sync controls

Sync status