Search

GlobalSCAPE Knowledge Base

Folder Monitor Change Filter Override

Karla Marsh
EFT

THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • EFT Server version 5.1.1 and later
  • EFT v4.x to v7.4.x stores advanced properties in the registry.
  • EFT v8.x stores Advanced Properties in a JSON file.
    • When you upgrade from EFT v7.4.x to EFT v8, the non-default settings that you have defined in the registry will be added to the Advanced Properties file during upgrade. (Default settings are part of the EFT configuration files.)
      For information about of advanced properties, please refer to the help or your version of EFT.

DISCUSSION

You can create/edit an advanced property to set the "dwFilter" parameter that is passed into the function "ReadDirectoryChangesW()", which is the core of the Folder Monitor feature.

In v8.0 and later, add the name:value pair to the advancedproperties.json file as described in the "Advanced Properties" topic in the online help for your version of EFT.

{
"FolderMonitorFilterValue":125
}

In versions prior to v8.0,

On 32-bit systems:

[HKEY_LOCAL_MACHINE\SOFTWARE\GlobalSCAPE Inc.\EFT Server 4.0\EventRules]

On 64-bit systems:

[HKEY_LOCAL_MACHINE\Software\Wow6432Node\GlobalSCAPE Inc.\EFT Server 4.0\EventRules]

"FolderMonitorFilterValue"=dword:0000007D

The default value is the same legacy value that had been present since the initial delivery of the feature:

FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS

(This is a value of 0x7D)

This is useful to override to "quiet" the folder monitor event dispatching; for example, if only looking for NEW files added to the folder, then exclude the "FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_LAST_ACCESS" set.

MORE INFORMATION

Below are some general comments about integer values in the advancedproperties.json file.

  • Do not put quotation marks "" around integer values.
  • Values should only be decimal. "0x7D" is a HEX value; "0x"should never be used as a value prefix.
  • Do not use leading zeros.

The setting for "FolderMonitorFilterValue" specifies a filter used against folder monitor file system events. By OR'ing combinations of the following bit masks, a filter can be created that allows only certain kinds of events to be processed. By default, all except security events are processed, corresponding to a filter value of 0x007D (decimal value of 125). (To quickly find the decimal value, use your computer's calculator app to convert HEX to DEC.)

Bit masks:

  • 0x0001 - file name change
  • 0x0004 - attribute change
  • 0x0008 - size change
  • 0x0010 - file write
  • 0x0020 - file access
  • 0x0040 - file creation
  • 0x0100 - security change

After determining the filters you want to apply and OR’ing their associated masks together, the filter value is the decimal representation of the resulting hex value that must be used in the advancedproperties.json file.

Details
Last Modified: 2 Weeks Ago
Last Modified By: kmarsh
Type: HOWTO
Rated 1 star based on 6 votes.
Article has been viewed 49K times.
Options
Also In This Category
Tags