Search This Blog

Saturday, 28 February 2009

New WatchDirectory beta

We just released a new WatchDirectory beta for version 4.5.9.

See this forum post for the download link.

The beta has one bugfix and one new feature.

The plugin to "launch programs" did not set the WD_REASON variable for new folders properly (it was set to DIREW instead of DIRNEW). This has been fixed - thanks for reporting this, Mark.

A new feature in the WD Control Center allows you to Find (and select) tasks. Use CTRL+F (or the View -> Find menu) to find tasks. This can be very helpful if you have a lot of tasks to manage.

Monday, 23 February 2009

GMail as your SMTP server

WatchDirectory v4.7

The work-around described in this post will soon be obsolete. The new beta for WatchDirectory v4.7 implements secure SMTP connections, see this blogpost

GMail requires secure connections

If you want to configure WatchDirectory to use GMail as its SMTP server, you will find that currently WatchDirectory does not support secure (TLS/STARTTLS) connections for email. To work around this, you will need to run another program (stunnel) to "wrap" WatchDirectory's connection to GMail. WatchDirectory will then connect to stunnel, which will connect to gmail.

Download / Configure stunnel

Download stunnel-4.xx-installer.exe (I tested with version 4.26) and run the installer. Install stunnel to the directory C:\Stunnel.

Inside the c:\Stunnel directory create a text file called gmailsmtp.txt with the following content (8 lines).

; SMTP configuration for Gmail
output = SMTPgmail.log
taskbar = no
cert = stunnel.pem
client = yes
accept =
connect =

Change to your computer's IP address or name. Do not use "localhost" or as that won't work.

Open a command prompt (cmd.exe) and navigate to the stunnel install directory (CD C:\Stunnel). Enter the following 2 commands to run stunnel as a Windows Service:

stunnel -install gmailsmtp.txt
net start stunnel

Configure WatchDirectory

Now you need to configure WatchDirectory's Email Settings to connect to stunnel.

  • Your SMTP server: enter the same name or IP address you entered in gmailsmpt.txt
  • Port: 8025
  • Authentication: Login
  • Userid: your gmail address (
  • Password: your gmail password

Now press the "Test" button. If you configured everything correctly, a test email will be sent. This test email will also show up inside your gmail account in the "Sent Mail" folder.

Further Reading

Configure GMail
WatchDirectory's SMTP Settings

Saturday, 21 February 2009

Last Access Time on Vista

Just a quick note about Windows Vista (and probably Win2008 and Win7).

WatchDirectory's File Age monitoring method can detect "old files" based on their "Last Access Time" (the last time the file is opened). This timestamp is maintained on NTFS volumes when the registry key
is set to zero or does not exist.

Windows versions before Vista defaulted this setting to zero, so the Last Access timestamp was maintained for files on NTFS volumes. To improve file system performance, Microsoft disabled Last Access recording on Vista.

If you want to detect "old files" based on their Last Access time, please make sure this registry setting is set to zero.

More information:

Saturday, 14 February 2009

Monitor Huge Directories for Changes

Just a few quick tips if you want to detect new, changed or deleted files in *huge* folders.

The most important setting (performance wise) in WatchDirectory is the Monitoring Method. You can select between several methods, but only the "Fast" method is independent of the size of the monitored directory. The other three methods work by scanning the directory for changes - large directories take more time and memory to process.
The "Fast" monitoring method doesn't need to scan the directory - Windows will inform the task of the exact change that happened.

If you can not use the "Fast" method, make sure to exclude all subfolders you do not want to monitor. Also filter out unneeded files and/or directories.
If you have the choice between "exclude sub-folders" and "filter", the optimum way (performance) is to exclude subfolders. An excluded subfolder is never scanned for changes. The filter events settings are applied at a much later stage - after the directories are scanned.

Even if you do use the "Fast" monitoring method, in some cases WatchDirectory will actually "scan" the directory. This happens when you

  • Select Fire FILENEW/DIRNEW events for all files at startup or When starting up, check for missed events on the Other Settings window.
  • Select Trigger for all files and subdirectories below the renamed directory on the Events to detect window.

I hope this post helps you understand the effect of the options you select in WatchDirectory.