watchDirectory Help

Help Home
Creating New Tasks
Running Tasks
Task History

Plugins

Standard versus Pro
Version History

Search

Creating New Tasks

  1. Select the plugin to use
  2. Plugin Settings
  3. Directory to Watch
  4. Directories to Exclude
  5. Filter Events
  6. Monitoring Method
  7. Events
  8. Scheduler (Pro)
  9. Other
  10. Name and Description
  11. How to Run
  12. File Permissions



Free 30 day evaluation!
Standard version: $79 USD
Professional version: $149 USD
Buy Now!

 

German Helpfile

German Helpfile

French Helpfile

French Helpfile

Spanish Helpfile

Spanish Helpfile


Privacy Policy

Filter Events

Previous TopicPrevious Topic | Next TopicNext Topic
Filter events

On this page you create Filters to limit types of files for which your task starts. Every time watchDirectory detects a new event (a new file, a deleted file, etcetera), all filters are evaluated against the filename of the file or directory. The first filter that evaluates to "true" determines if your task is called for this event.

If you do not create any filters, your task runs for all files and directories.

The list of filters

The area marked 1 on the screenshot shows all created filters. They are evaluated by watchDirectory from top ("file starts with") to bottom ("extension equals"). A filter can tell watchDirectory to process the event (indicated by a green checkmark), or to ignore it (shows a red cross).
The screenshot shows a list of 3 filters, instructing watchDirectory to:

As watchDirectory will evaluate these filters from top to bottom, and stop when one of them evaluates to true, the order of filters is important. Press the Up and Down buttons to rearrange the filters.

Create a new Filter by pressing the New button. Change the selected filter by pressing Change. If you want to create a new filter that is very much like an existing filter, select the existing filter and press Copy.

Tip: 4.0 -> 4.1

Version 4.0 -> 4.1

Previous watchDirectory versions used another method of filtering events.

Your old "Files that trigger events" options are automatically converted to the new "Filter Events" settings when you edit your task.

Files that do not match a filter

With the selection box marked 2 on the screenshot, you tell watchDirectory what to do with files and directories that do not match any filter. In most cases you would select the option to ignore these files.

Filter Scripts

When the normal filters are not flexible enough, you can write a batch file that determines if the event is processed. Several example scripts to get you started are installed in <Install Directory>\ExampleFilterScripts.

Note that most examples need a few little changes before they will work properly.

If you want to use one of the example scripts, make sure to copy it to another directory. Future WatchDirectory installs may otherwise overwrite the script with a new version, overwriting your changes.

See also readme.txt

Testing your filters

The area marked 3 on the screenshot, allows you to enter a filename that is used to test the filters you created. It will show you which, if any, filter evaluated to true, and if the file in the edit box will be processed by your task.
The "Test Result" column in the area marked 1 also shows the result of each individual filter.

When all filters evaluate to "false", the result of the test is the selection you make in the "Files that do not match a filter" box (marked 2).





Previous TopicPrevious Topic | Next TopicNext Topic