<< Click to Display Table of Contents >> Global File Filters |
|
Overview
Filter expressions govern the inclusion and exclusion of files under the Watch Set. Included files are subject to scan and event detection, while excluded files are not. Initially, all files are included and no files are excluded, except for the internal expressions listed below under Auto Excluded Filter.
Filtration can be configured with wildcard expressions to more easily cover well-known file extensions or names that follow established patterns. When a single expression is insufficient for configuring filtration, multiple expressions may be supplied. You can also filter file based on a file's last modified time and file size.
Usage Notes
Since inclusions and exclusions are expressed separately, it is possible to submit conflicting expressions. The expression evaluator addresses this by exiting when a file is determined to be excluded. Therefore, exclusions expressions override inclusion expressions.
Rename operations may subject files to an inclusion status change. Renaming a file out of the Watch Set will trigger a target deletion, while renaming into the Watch Set triggers a target addition.
Folder deletions only affect included files, possibly leading to folder structure inconsistencies. When a session participant deletes a folder, the target outcome will vary depending on whether excluded files are present. Folder deletions are propagated in detail to the targets as to the exact files that have been affected.
The following wild card expressions are automatically applied as exclusion expressions and cannot be changed:
Temporary files generated by common applications
~$*.*
*.tmp
*.$$$
Any file without a file extension, e.g. abcdefg
Explorer System Files
thumbs.db, and Windows shortcut file e.g. *.lnk
Configuration Notes
The excluded and included file name filters take one or more standard wildcard expressions that are combined by performing a logical OR of each wildcard expression.
* |
Matches zero or more characters of any value |
? |
Matches one character of any value |
The following examples show the use of wildcard syntax to enter a file exclusion or inclusion:
*.ext Filter files that end with the .ext extension
ext Filter files that contain the string ext
ext* Filter files that start with the string ext
Peer Management Center also supports the use of complex regular expressions, e.g. <<regEx>>. These expressions can be used for either included or excluded patterns. For information on where to enter a regular expression, see the Configuration section immediately below.
A good reference on regular expressions can be found here: http://www.regular-expressions.info/reference.html
Filtering on Folders
In addition to filtering on files, you can filter on folders using the following syntax: \Folder or \Folder* or \Folder\*
Presently, Peer Management Center only supports included expressions for a full folder path, and does not support wildcard matching on parent paths. For example, the following expression is not valid: \Folder*\Folder
Reduce the Number of Jobs Using Folder Filtering
For management purposes, we recommend keeping the total number of jobs as low as possible, preferably to no more than 10. Using folder filters, you can reduce the total number of jobs without sacrificing efficiency. This process involves analyzing all existing jobs, identifying all the folders and hosts that will be collaborating, and consolidating them into fewer jobs by watching a few root folders at a higher level. Filters will then be added to include or exclude only the folders of interest. Here is a small example which demonstrates this concept:
Example:
Reduce existing four jobs down to two:
|
|
Server 1 |
Server 2 |
||
|
|
Drive D |
Drive E |
Drive D |
Drive F |
Old Jobs |
Job 1 |
D:\General |
|
D:\General |
|
Job 2 |
|
E:\Common |
|
F:\Common |
|
|
Job 3 |
D:\Projects |
|
D:\Projects |
|
|
Job 4 |
|
E:\Documents |
|
F:\Documents |
After consolidation:
|
|
|
Filter Option 1 |
Filter Option 2 |
|
|
|
Server 1 |
Server 2 |
INCLUDE |
EXCLUDE |
New Jobs |
Job 1 |
D:\ |
D:\ |
\General\* |
All other files |
|
|
|
\Projects\* |
|
|
|
Job 2 |
E:\ |
F:\ |
\Common\* |
All other files |
|
|
|
\Documents\* |
|
Jobs 1 and 3 were merged into a single job watching the root D drive on both servers while using Filter Option 1 or 2.
Jobs 2 and 4 were merged into a single job watching the root E drive on Server 1 and the root F drive on Server 2 while using Filter Option 1 or 2.
Please note the following regarding regular expressions:
•Peer Management Center does not support the ability to use Regular Expressions for multi-level folder inclusions such as \Level1\Level2\FolderName.
•Peer Management Center does not currently support the ability to filter on certain parts of a path, like \Folder\*\Folder and \Folder*\.
Additional Folder Filter Examples
To exclude a specific folder from anywhere within the Watch Set:
*\FolderName
*\FolderName\FolderName
To exclude a specific folder from the ROOT of the Watch Set:
\FolderName
\FolderName\FolderName
To exclude folders that END with a specific name from anywhere within the Watch Set:
*FolderName\
To include a specific folder from the ROOT of the Watch Set:
\FolderName
\FolderName\FolderName
The Peer Management Center supports the concept of "File Filter Configurations" where a single configuration (consisting of a unique name, and lists of inclusion and exclusion expressions) can be applied to multiple file collaboration jobs without requiring repeat entry for any job. This capability also allows you to define File Filter combinations for use with specific collaboration scenarios.
To mange these configurations, navigate to the Window menu of the Peer Management Center, select Preferences, then navigate to and select File Filter Configurations from the tree node on the left. The following screen represents the list of defined File Filter configurations, along with buttons to add new ones and edit, copy and remove existing ones. To increase flexibility, multiple File Filters can be applied to a single job, combining elements of each to form one large filter. For more information on selecting multiple filters, see the page on File Filter Selection.
Upon adding or editing a File Filter configuration, the following dialog is displayed:
When creating a File Filter configuration, you will generally want to exclude all temporary files created by the applications you use so they are not propagated to the targets hosts. For example, AutoCAD applications should add the following expressions to the Excluded File Name filter table:
*.AC$
*.SV$
*.DWL*
*.BAK
To do so:
1.Click the Add button under the Excluded File Name Wildcard Pattern table and enter *.AC$ and then click OK.
2.Repeat Step 1 to add *.SV$, *.DWL* and *.BAK
Your AutoCAD temporary file exclusion filter configuration is now created and all files ending in *.SV$ or *.AC$ or *.DWL or *.BAK will be excluded from collaboration within any running file collaboration job that uses this configuration..
Additionally, complex regular expressions in the format <<regEx>> can be used in both the inclusion and exclusion pattern lists. An example is shown in the dialog screenshot above (<<^.*\\atmp[0-9]{4,}$>>).
The following regular expression excludes any path containing a folder "XX" which also contains a child folder "YY"
<<^.*\\XX\\YY(\\.*$|$)>>
The following files and folders MATCH the above expression:
\projects\xx\yy
\accounting\projects\xx\yy\file.txt
\accounting\projects\xx\yy\zz\file.txt
The following files and folders DO NOT MATCH the above expression:
\projects\accounting\file.txt
\projects\xx\y
\projects\xx\yyy\file.txt
\accounting\projects\xx\file.txt
\accounting\projects\yy\xx\zz\file.txt
Filtering on Last Modified Date
In addition to filtering on file names, file extensions, folder paths, or partial path wildcard pattern matching, you can filter based on a file's last modified date. Peer Management Center only supports filtering on a file's last modified date and does not support filtering on a folders last modified date. In addition, if you have a folder hierarchy that contains files which are all being filtered based on last modified date, then all folders will still be created during the initial scan process on all hosts. If a file is excluded from collaboration based on last modified, then the initial scanning process will not synchronize the file even if the file's last modified time and size do not match, or the file does not exist on all hosts. However, the file will be synchronized, if and when the file is modified in the future, and if a user deletes or renames the file on any host, the file will be deleted or renamed from all other hosts where the file exists.
Please note that if last modified date filtration is used in a single filter configuration, no other types of filtration can be used in the configuration.
Options for Included Last Modified Date Filter
Include all dates |
This is the default option and will include all files regardless of last modified date. |
Include today and past |
Includes all files whose last modified date are more recent then the specified number days. For example, you can exclude all files that have not been modified within the last year (365 days). |
Include older than |
Includes all files whose last modified date are older then the specified number days. |
Filtering on File Sizes
Filtration can also be done based on an individual file's size. Peer Management Center does not support filtering on a folder's total size. In addition, if you have a folder hierarchy that contains files which are all being filtered based on size, then all folders will still be created during the initial scan process on all hosts. If a file is excluded from collaboration based on size, then the initial scanning process will not synchronize the file even if the file's last modified time and size do not match, or the file does not exist on all hosts. However, if a user deletes or renames the file on any host, the file will be deleted or renamed from all other hosts where the file exists.
Please note that if excluded file size filtration is used in a single filter configuration, no other types of filtration can be used in the configuration.
Options for Excluded File Sizes
None |
This is the default option and will include all files regardless file size. |
Exclude files greater than or equal to |
Exclude all files whose size is greater than or equal to the specified number of bytes. For example, you can configure a job to exclude all files greater than 1GB (1073741824 bytes). |
Exclude files less than |
Exclude files whose size is less than the specified number of bytes. |
Sync-only and Lock-only Filters
With sync-only filters, Peer Management Center now supports the ability to exclude file types from being locked when a file open is detected on a participant.
Likewise, with lock-only filters, Peer Management Center now supports the ability to exclude synchronization across an entire job so that only opens and closes are detected and acted on, without any synchronization being performed.
To select one of these two filters, use the Filter Type drop-down list.
For more details on these filters and when they should be used, please review this Tech Brief: http://www.peersoftware.com/resources/tech-briefs.html?view=document&id=84