Search This Blog

Sunday 6 February 2011

A world without Alzheimer's disease

I almost forgot to honor one of my heroes, Ronald Reagan. Here in Holland there is not much news about this Great President of the USA, our press in Holland seems to forget that the fall of the wall would never have happened without him (and Gorbachev).

A Terrible Disease

The last years of his life, Mr Reagan suffered from Altzheimer's disease, a terrible illness affecting one of the things separating us from animals: our brain.

In one of his last letters to the American nation, he said:

I have recently been told that I am one of the millions of Americans who will be afflicted with Alzheimer's Disease... At the moment I feel just fine. I intend to live the remainder of the years God gives me on this earth doing the things I have always done... I now begin the journey that will lead me into the sunset of my life. I know that for America there will always be a bright dawn ahead. Thank you, my friends. May God always bless you.

My Mother

... I am not sure what to say ...
She will be 80 soon and asked for donations to the Dutch Alzheimer support group instead of presents (she already has everything, grand-child nearby and a loving husband taking care of all her needs).

GdP Software will donate all February earnings to the Dutch Alzheimer Stichting. Mom, I love you!

Your Mother?

Please help fight this terrible disease! Support your local Alzheimer support group! For example The American Alzheimer's Association.

Saturday 5 February 2011

WatchFTP beta

On our forum we have a new beta for WatchFTP 2.4. See this post for download links and all details.

New in this Beta

  • The Email action can now also send to CC and BCC email addresses
  • The Email action can send html formatted emails
  • The Email action supports a so-called Repeat block

Friday 4 February 2011

Is a WatchDirectory task Running?

Here is an example how you can check if a WatchDirectory task is running from inside a batch script. The example relies on Microsoft's Handle.exe to check if there is a wdrun.exe process that has the history database of the given task open.

The wdIsTaskRunning.bat Script

@echo off
rem this example script checks if a WatchDirectory task is running
rem usage:
rem  wdIsTaskRunning abc
rem     this checks if the task abc is running
rem  
rem This script uses Handle.exe ( http://technet.microsoft.com/en-us/sysinternals/bb896655 )
rem to see if the history.db file of the task is opened by a wdrun.exe process.
rem
SET HANDLE=C:\SysInternals\Handle.exe
SET TMPFILE=C:\Temp\handle_%RANDOM%.txt

"%HANDLE%" -p wdrun.exe \%1\history.db > "%TMPFILE%"
FINDSTR /L /C:"No matching handles found." "%TMPFILE%">NUL
if %errorlevel% equ 0 (
   echo The task %1 is NOT running
   SET TASKRUNNING=N
) else (
   echo The task %1 is running
   SET TASKRUNNING=Y
)
del "%TMPFILE%"

Alternative Implementation

The script above works for all WatchDirectory tasks but it needs Admin privileges to run handle.exe. If the task is configured to run as a Windows Service, you can also parse the output of the NET START command to see if the task is running.

@echo off
rem this example script checks if a WatchDirectory task is running
rem usage:
rem  wdIsTaskRunning abc
rem     this checks if the task abc is running
rem  
rem
SET TMPFILE=C:\Temp\netstart_%RANDOM%.txt

NET START > "%TMPFILE%"
FINDSTR /L /E /C:"watchDirectory:%1" "%TMPFILE%">NUL
if %errorlevel% equ 0 (
   echo The task %1 is running
   SET TASKRUNNING=Y
) else (
   echo The task %1 is NOT running
   SET TASKRUNNING=N
)
del "%TMPFILE%"