Search This Blog

Saturday, 15 March 2014

WatchDirectory v4.8.7 beta 1

On our forum we have a first beta available for WatchDirectory v4.8.7. The new version has several improvements when monitoring directories where files have "illegal names". More information and the download link are in this forum post.

Wednesday, 12 March 2014

Filter Scrips - Slightly underdocumented


WatchDirectory v4.7 and higher have support for filter scripts, run a little batch script to decide if a detected file should be processed by a task. This is a new option on the Filter Events settings of your task.

Before this new feature was introduced you could only filter based on (parts of) the filename or folder where the file was detected. For example "only run the task for files that match *.txt". The new filter script option gives you far more flexibility, your script receives all information about the detected file in Environment Variables and can, for example, check the contents of the detected file to decide wether the task should continue processing the file.

Several example filter scripts can be found inside the directory <Install Directory>\ExampleFilterScripts (typically C:\Program Files (x86)\watchDirectory\ExampleFilterScripts).

Example: Only email when files contain the word "Error"

A client was monitoring a directory where log files are created by an automated nightly process. Most log files are of no interest but sometimes one or two files contain error information and the client wants to be notified of those. He created a task using the Email plugin and enabled the option to attach the log file. Below is the filter script he used.

rem When called from the WatchDirectory Control Center, always process the "event"

rem use FINDSTR to check the contents of the file
FINDSTR /I "Error" "%WD_FILE%"
IF %errorlevel% EQU 0 GOTO :SayYes
rem this is not an error log, tell the task to ignore the event



A few tips

Do not perform any heavy processing inside those scripts. If your script takes a long time to finish the WatchDirectory task will abort. A few seconds is okay, 10 seconds is not.

Make sure your script always writes its result (the single character Y or N) to the result file (echo Y > "%WD_FILTERRESULT%").

Monday, 3 March 2014

WxRemote v1.9.1 released

We just released version 1.9.1 of WxRemote. This release fixes a problem that caused the WxListener component to crash.

Version 1.9 -> 1.9.1

If you have version 1.9 installed (released last month), we recommend you to upgrade to this new release as soon as possible.

Version 1.x -> 1.9.1

This free upgrade to version 1.9.1 will show the current activity of your WatchDirectory and WatchFTP tasks. Full details in this blogpost.

Download the new version from the WxRemote home page.

Sunday, 2 March 2014

WatchDirectory version 4.8.6 released

We just released a small update for our File Monitor program WatchDirectory. New and improved in this release:

  • Fixed: The new Quick History viewer did not show all messages in the correct order.
  • Improved: Added a "Find" box to the Quick History viewer.
  • Fixed: The upload task did not properly check if it was connected to the FTP server when uploading the first file of a run.

Free Update

If you are running any v4.x version of WatchDirectory, this is a free update for you. Just install the new version "on top" of your current install and it will keep all your current settings and tasks. Download the new version here.