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\. 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 |
|
Default OneDrive location |
|
Favorites directory |
Description |
Exclude files above a certain size for all users on the machine |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* |
Exclude files equal to or over 1GB |
Value | Size >= 1GB
|
*Note: The Name value can be set to anything you wish to use, typically it would be used to describe the exclusion.
Description | Exclude files that have not been modified within the last year for all users on the machine |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude files older than 1 year |
Value |
|
Description |
Exclude files or folders based on the supplied pattern for specific users, ignoring the case. This exclusion would apply to any folder called LocalFilesNoSync regardless of its location within the managed area. |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude any folder called LocalFilesNoSync |
Value |
|
Description |
Exclude files or folders based on the supplied path. |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude files and folders that contain %USERDOMAIN% |
Value |
|
Description |
Exclude desktop.ini and Thumbs.db files (based on the supplied pattern) for all users on the machine, case sensitive. This applies regardless of their location within the File Director managed area. Note that support for environment variables in NAME based expressions was introduced in File Director 2021.1 |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* |
Exclude desktop.ini and Thumbs.db |
Value |
|
Description |
Exclude files that are larger than 1GB in size unless they have typical Office file extensions, regardless of their location within the File Director managed area. |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* |
Exclude files above 1GB except for Office files |
Value |
|
Description |
Exclude the specified folder and any items within it. |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude beneath LocalFilesNotSync |
Value |
BENEATH =="%USERPROFILE%\Desktop\LocalFilesNotSync" |
Description |
Exclude executables |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Stop executables |
Value |
|
Description |
Exclude files with test in their name |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude test files |
Value |
|
Description |
Exclude items which have DoNotUpload at the start of their name |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude Items with DoNotUpload at start |
Value |
|
Description |
Exclude files which start with a dot |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Exclusions |
Type | REG_SZ |
Name* | Exclude Dot Files |
Value |
|
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.
Description |
Override the default exclusion to allow the Favorites folder to sync |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\ExclusionOverrides |
Type | REG_SZ |
Name* |
Override Favorites |
Value |
|
Description |
Override the default exclusion to allow tmp files to sync |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\ExclusionOverrides |
Type | REG_SZ |
Name* |
Override tmp |
Value |
|
Description |
Override the default exclusion for AppData and sync PSTs from within the Microsoft Outlook location (default location for older Outlook installations) |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\ExclusionOverrides |
Type | REG_SZ |
Name* |
Include PSTs from Outlook folder within AppData |
Value |
|
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
Description |
Elective to prevent automatic download of iso files – these will need to be manually synced |
Registry path | HKLM\Software\AppSense\DataNow\FilePolicy\Electives |
Type | REG_SZ |
Name* |
Stop auto download of iso files |
Value |
|
Description |
Prevent large files from downloading automatically |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Electives\ |
Type | REG_SZ |
Name* |
Big files (over 50Mb) |
Value |
|
Description |
Prevent files which have not been modified in the last month from downloading automatically |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Electives |
Type | REG_SZ |
Name* |
Old files (over a month old) |
Value |
|
Description |
Prevent files greater than 2GB or greater than 1GB if they are ISOs from downloading automatically |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Electives |
Type | REG_SZ |
Name* |
Files bigger than 2GB or ISOs bigger than 1GB |
Value |
|
Description |
Prevent MP4a files that were created over a year ago or are larger than 50mb from downloading automatically |
Registry path | HKCU\Software\AppSense\DataNow\FilePolicy\Electives |
Type | REG_SZ |
Name* |
Exclude MP4A if old or big |
Value |
|
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.