Search This Blog

Thursday 27 October 2011

Walk to end Alzheimer's

I just saw this link on facebook, there are no walks in Holland...

There is one terrible thing on earth that should bind us all together. It is not white against black, Muslims against Christians, Arabs against Jews, "left wing politics" against "right wing politics"....

It is a terrible disease that can affect all of us or the people we love.

It should be All Of Us against Alzheimer's. Next year I will again give my February income to www.alz.org (or to the Dutch http://www.alzheimer.nl/ ). Yes I am cheap, the shortest month of the year.

Can you perhaps spare an hour, day or month of your income to fight Alzheimer's? Everything helps and who knows, you may be helping your parents, yourself or your children.

Thursday 20 October 2011

After printing the PDF, I want to...

Some of the WatchDirectory plugins are actually small batch file scripts (.bat or .cmd). Those scripts are typically called by WatchDirectory when new files are detected.

For example, the "Print PDF using FoxIt Reader" plugin is a .bat script that calls Foxit to print the pdf.

Some customers want to have a bit of extra functionality after printing the PDF, for example Delete, Copy or Move the pdf. Here is how you do it, should be easy enough if you know a little bit of batch scripting.

Locate the batch Script to change

In this blogpost I will assume your WatchDirectory task is called PrintPDF, change the directory name below accordingly.

  • Make sure the task (PrintPDF) is not running while you make changes to its script
  • Inside the WatchDirectory Control Center select the menu "Tools -> Explore Task Directory"
    (this opens Windows Explorer inside the directory where WatchDirectory stores all its settings)
  • Navigate one directory "deeper" into the subdirectory with the name of your task (PrintPDF)
  • Inside this directory you will find a file called wd.bat, this is the script started by WatchDirectory

Make the changes

Open the file wd.bat in a text editor (notepad) and scroll to the bottom where you will find the following 2 lines

"%FOXCMD%" %OPTIONS% "%WD_FILE%" "%PRINTER%"
%ANNOTATE% Info done

Any changes you want to make after the file has printed should be just before the "%ANNOTATE%" line.

Delete the PDF after printing

Insert the following line

DEL "%WD_FILE%"

Move the PDF after printing

Insert the following line

MOVE "%WD_FILE%" "C:\Some Other Directory"

Print the PDF twice

Just repeat the FOXCMD line, like this

"%FOXCMD%" %OPTIONS% "%WD_FILE%" "%PRINTER%"
"%FOXCMD%" %OPTIONS% "%WD_FILE%" "%PRINTER%"
%ANNOTATE% Info done

Tuesday 11 October 2011

WatchDirectory v4.6.7 Beta 3

On our forum we have a new beta for WatchDirectory v4.6.7. Changes in this beta:

  • Improved: Implemented "Clear Command Channel" for FTPS protocols
  • Fixed: The Upload Files task will now retry to connect when it receives a 40425 error
  • Fixed: The Environment variable WD_FILE_E was not properly set for files without extensions
  • Fixed: WatchDirectory crashed (or just didn't work) on Vista and Windows-7 when not running as an Administrator
  • Improved: The WatchDirectory Control Center is more efficient (cpu and resources)
  • New: Filter Events can now also filter with bat scripts for complex filter situations.
  • New: A new plugin to Remove the Oldest Files from a Directory: Use it to delete old log files while keeping the 10 newest.
  • New: The Zip File task can now be used as a Subtask.
  • Fixed: The task that Upload Files to an FTP Server would send false email warnings when renaming files.

Download the beta from our forum.