Search This Blog

Showing posts with label WatchDirectory. Show all posts
Showing posts with label WatchDirectory. Show all posts

Friday, 1 July 2022

WatchDirectory - Could not create temporary file

 

If you try to edit or create a WatchDirectory task and receive a message like

"Could not create a temporary file"

Here is the reason and how to resolve this issue.

Why this happens

While you create or edit a task the WatchDirectory Control Center needs to store your new settings somewhere. It can not be inside the WatchDirectory settings directory itself because you may cancel editing. So WatchDirectory asks Windows what the directory for "temporary files" is.
All your changes are made to a temporary file inside that directory. When you press OK, the file is moved to the WatchDirectory settings directory.

The problem here is Windows tells WatchDirectory it can create temporary files in some directory (something like C:\Temp), but there is a problem. Typically the directory does not exist or (not so common) WatchDirectory is not allowed to write/create/delete files inside the directory.

How to resolve

Here are the steps you need to follow to fix this:
  1. Stop the WatchDirectory Control Center
  2. Open a Windows command prompt by running cmd.exe
  3. On the command prompt enter the following 2 commands
    SET TMP
    SET TEMP
Those commands will respond with the name of 1 or 2 directories (they typically are the same directory). Now you need to make sure those directories exist and "Everyone" has the privilege to create/change/delete files inside them.


Tuesday, 14 December 2021

Log4J Security threat (no worries)

The recent Log4j, CVE-2021-44228 security threat

Our programs do not use the Log4j package for logging. They are not written in the Java language so can not use this package.
(more info on the security threat)

Friday, 25 May 2018

The new European Privacy Law (GDPR / AVG)

Your Privacy

Ok, we need to write something to be in accordance with European laws.
Here is the short version: "You're OK, we don't use your data in any way we would want our data to be used".

If you are "just a visitor" on our websites

We use a third party company, used by many other companies, statcounter.com who uses cookies on our sites. The info we get from them is which pages you visit and if you encounter any broken links.
We use this information to see if our websites are working properly, we don't know who you are.

If you contact us

If you use our Contact Us form on our company website, we will obviously use your name/email to respond. After that we will not store or use your name/email anymore. We don't spam.

If you are a customer

Here it gets interesting.
We sell our programs (mainly) through our American reseller BMT-Micro. Some sales are through other resellers, some directly with us. In all cases we receive the information of the buyer ("you") that was entered on their website. We do not receive any credit card information!

The information we receive include your name, email and address (street, city, country). We only use your name and email to send you your license information.

When we have an important (major) update to the program you bought we send you an email. This email always has an option to unsubscribe, not receive those emails anymore. You can expect an email once or twice each year.

Third Parties

We do not sell or give your information to anyone. Obviously.

Ownership of this information

If you want to be "forgotten", email us saying so at our Contact Us form. We will remove your license information (name, email, address etc) from our customer database. Note that will also mean you won't be able to lookup your license information anymore at this page. Your license will continue to work but if you want to move it to another computer we can not help you anymore.

Questions ?

If you have further questions about this, please Contact Us.

Thursday, 30 November 2017

20% Discount on all our programs and upgrades

We didn't do anything on Cyber-monday and got complaints ;-)

20% Discount on our programs during December 2017

What should we name this? December-Discount, sounds a bit dull. Anyway, use the discount-code DECEMBER in our webshop to get an immediate 20% discount on new licenses for our programs. This also applies to Upgrades to WatchFTP version 4.

Sunday, 4 June 2017

WatchDirectory v4.9.5 released

We just released a new version of our File System Monitor WatchDirectory. This is a free upgrade for all customers. Just install the new evaluation version "on top" of your version and it will automatically see your tasks and licenses.

New/Fixed in this release

  • Fixed: WatchDirectory crashed on (some) Asian language systems.
  • Improved: The new System.Mail now allows you to connect to SMTP servers without username/password.
  • Improved: The Print PDF task has several new settings.
  • Fixed: The email reports of the Audit task weren't properly sent at 6am.
  • Fixed: Large file uploads by the FTP task didn't properly report their progress.
  • Improved: The Unzip task now supports password protected zips.

Thursday, 21 July 2016

WatchDirectory v4.9.4 released

We just released another free update for our program WatchDirectory. To update, download the evaluation version from our website, stop all your tasks and install this new release "on top" of your current install. That way, all your settings, license info and tasks are kept.

New in this release

  • Improved: Updated the supported encryption methods for the FTP Upload plugin.
  • Improved: When you let the Email task combine multiple emails, there is a new setting to prevent the same file being attached multiple times.
  • Improved: The Print PDF task has a new option to set the print orientation (Portrait or Landscape).

The installer now uses a new so called SHA256 code signing certificate. Our older installers used a so-called SHA1 certificate. Older Windows versions (for example Windows XP) do not recognize the new certificate and may give you a warning that the certificate is corrupt. You can safely ignore that message.

Wednesday, 11 May 2016

Email alert for empty folders

A customer asked how he can setup our program WatchDirectory to notify him when a folder is created and no files are present after a few hours.
WatchDirectory is typically used to detect new files or folders so this requires a little scripting to get right.

Setup the Email task

Create a new task based upon the Email Plugin. Use something like "Folder %WD_FILE_N% is empty after 2 hours" as the subject and "%WD_FILE% is empty" somewhere inside the email body.
%WD_FILE% is replaced with the full path (C:\Some\Folder) of the new directory, WD_FILE_N by the directory name without its path (just "Folder"). See Variables for all variables you can use.

For the Monitoring Method select File Age, let it trigger for files (it also does directories) older than 120 minutes. Make sure to check the option "Remember triggered files" unless you want to receive multiple alerts as the folder gets older and older.

On Events only select "DIRNEW" - to detect folders, we are not interested in files.

The Script that actually checks for empty folders

WatchDirectory can not do everything for everyone just by installing but it has amazing ways how you can customize its functionality with little scripts. In this case the customer wants to receive a notification when a folder is empty after X hours, something not directly supported ("build in") by WatchDirectory.

On Filter Events you can add several standard filters to prevent triggering the WatchDirectory task (for example, the file or directory must match "Customer_*.txt"), for this case we need a filter script (a .bat file).
Here is the script to use in this case:

rem filter script that checks if a detected "new" directory is empty
rem "new" in quotes because WatchDirectory triggers using the File Age
rem monitoring method for directories that are 2 hours old.
rem When the directory is empty, the task should trigger an email.
rem If the directory contains one or more files, no email should be sent.

rem %WD_...% variables are explained here: 
rem     http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html
rem File Age Monitoring:
rem     http://www.watchdirectory.net/wdhelp/help/wdnewconfigpage3.html
rem Filter Scripts:
rem     http://www.watchdirectory.net/wdhelp/help/filter_events.html

IF "%WD_REASON%" NEQ "DIRNEW" GoTo :NoTrigger

SET NUMFILE=0
FOR %%c IN ("%WD_FILE%\*.*") DO Call :FoundFile
IF %NUMFILE% EQU 0 GOTO :Trigger
GOTO :NoTrigger

:FoundFile
SET /A NUMFILE=NUMFILE + 1
GOTO :EOF

:Trigger
ECHO Y > "%WD_FILTERRESULT%"
GOTO :EOF

:NoTrigger
ECHO N > "%WD_FILTERRESULT%"
GOTO :EOF

Thursday, 11 February 2016

WatchDirectory v4.9.4 beta 1 - TLS 1.2 support

On our forum we have a first beta for WatchDirectory v4.9.4 available.

The FTP Upload task now supports the TLS 1.2 protocol for secure connections. Download the beta from the forum link above.

Wednesday, 16 December 2015

WatchDirectory v4.9.3.E released

A week ago we released version 4.9.3 of WatchDirectory. The last few days we released a few "micro updates" with small fixes and enhancements. Those micro updates do not show when WatchDirectory performs a "check for updates" so if you installed version 4.9.3 when it was released, you may want to install the current update (released today).

New since version 4.9.2

  • The new Print Pdf plugin has a new option to control how documents are resized (or not).
  • Dynamic Naming did not work properly for the new Print Pdf plugin.
  • The Print Pdf plugin does not add "GdP Software PrintPDF" to document names anymore.
  • The Auto ZIP plugin will retry after 10 seconds if one of the files to be zipped is locked.
  • Some (harmless) debugging code removed from Print PDF.
  • On some systems the "Auto Repair" of the history database did not work, the new release fixes this.

Download / Install

Download the current release here. Stop all your tasks and install this new release "on top" of your current installed version so it will keep all your settings and tasks.

Sunday, 25 October 2015

WatchDirectory 4.9.2 released - free update

We just released version 4.9.2 of our File Monitoring Program WatchDirectory.

New / Changed in this release

A new plugin has been added so WatchDirectory can now print PDF files directly without need for Acrobat or Foxit Reader. This works more reliable, faster and is easier to setup.

If you use WxRemote's "Last Message" option, WatchDirectory used a very inefficient method to write those LastMessage files. This has been fixed.

The Email Task can now request a read receipt. Note that this depends on the receiver's email client if those receipts will be sent.

When a task starts and it finds that its history database is corrupt, it will automatically repair this database.

Download / Install

Download the current release here. Stop all your tasks and install this new release "on top" of your current installed version so it will keep all your settings and tasks.

Monday, 12 October 2015

WatchDirectory v4.9.2 beta - Print PDF Files

You can now download a new beta version of WatchDirectory.

New in this beta version

This new beta includes a native plugin to print PDF files. Previously WD printed PDF files by calling Acrobat Reader of Foxit Reader to do the actual printing. This new plugin should be more reliable and work faster.

This release also checks to see if the history database is corrupt. The typical reason why it becomes corrupt is a power failure or a forced Windows shutdown. When a task is starting and it finds a corrupt database it will auto-repair it.

Download / Install

See this forum post for download and install information.

Monday, 4 May 2015

WatchDirectory v4.9.1 released - free update

We just released a new version of our Directory Monitor program WatchDirectory. This is a free update for all our customers, just download the evaluation version here and install it "on top" of your current install so it will keep all your settings and tasks.

New & Fixed

A serious issue was fixed for the Folder Size task. For some settings it didn't scan subfolders which caused wrong calculations for the total size of files.

New/improved is that you can use the $CALL$ macro to dynamically get the recipients for emails.

Saturday, 18 April 2015

WatchDirectory v4.9.1 beta 1

We have a first beta for WatchDirectory v4.9.1 available on our forum.

This new beta now also allows you to use the $CALL$ macro to get the recipients of an email, see the example on the forum.

Did you know we now also have a Spanish language website? WatchDirectory's helpfiles have also been translated to Spanish.

Saturday, 7 February 2015

WatchDirectory version 4.8.9 released

We just released version 4.8.9 of our folder monitoring program WatchDirectory. This is a free update if you currently have another v4.x version installed.

New & Fixed in this release

  • New: Use the $CALL$ macro in email tasks to dynamically set the subject and/or body of your emails.
  • Improved: If you use {dynamic naming}, the {drive} variable will now be set to the \\server\share name when monitoring a network share.
  • Improved: The System.Mail (wdPostman) program has been optimized to perform better when combining large numbers of emails.
  • Improved: The Upload to Amazon S3 task handles large files a lot better. It will also automatically retry several times when the http-connection is lost during a transfer.
  • Improved: The Upload to S3 plugin now allows you to select the end-point of your AWS server.
  • Improved: You can now import backups even while tasks are running (you can not import running tasks).
  • Fixed: The WatchDirectory Control Center crashed when you didn't install the help files and tried to create a new task.
  • Fixed: Inlining more than 9 images (using cid:image-root.10) in an html email did not work.

Download & Install

Download the new release here. Stop all your tasks and install this new version "on top" of your current release so it will keep all your settings and tasks.

Thursday, 29 January 2015

Call a script to set the subject of an email

The $CALL$ Macro

We just uploaded a new beta for WatchDirectory that has a very nice new feature: The $CALL$ macro which allows you to set (part of) the subject and/or body text of your emails.

This new feature allows you to call a batch script and use its "output" inside your emails.

Example: add the word "Error" to the subject when detected files contain the word "Error"

You could use the following text for the email subject:

$CALL:C:\Scripts\GetSubjectPrefix.bat$ detected file %WD_FILE_N%

The task will call the above script and will set all Environment Variables related to the detected file. Below is the GetSubjectPrefix.bat script:

rem use the FINDSTR command to look for the string Error inside the detected file
FINDSTR /I "Error" "%WD_FILE%"
IF %errorlevel% EQU 0 GOTO :ErrorFound
GOTO :ErrorNotFound

:ErrorFound
ECHO [ERROR] > "%WD_RESULTFILE%"
GOTO :EOF
:ErrorNotFound
ECHO [OK]  > "%WD_RESULTFILE%"
GOTO :EOF

Download

The download for this beta is available on our forum.

Monday, 24 November 2014

WatchDirectory v4.8.9 beta 1

A first (and likely last) beta for WatchDirectory version 4.8.9 is available.

To see what has changed and download the beta, visit this forum post: WatchDirectory v4.8.9 beta 1.

Thursday, 16 October 2014

Windows 10 - Yes, our programs will run on it

Microsoft again seems to do an excellent job on compatibility. Our programs run fine on the Technical Preview for the upcoming Windows 10.

Sunday, 14 September 2014

WatchDirectory version 4.8.8 released

We just released WatchDirectory v4.8.8, this new release has the following issues solved:

  • The ZIP files task could not properly create ZIP files containing large (> 4 GB) files.
  • The FTP files task sometimes ignored the text/binary setting after a reconnect to the FTP server.

Upgrade

This is a free upgrade for all customers, download the new release here. Stop all your tasks and install this new release "on top" of your current version so it will keep all your tasks and settings.

Sunday, 4 May 2014

Rename xml files using the value of an xml-node

Q&A

A customer wants to monitor a directory for new XML files and move/rename those files to a different directory. The files should be renamed to the value of an xml-node inside the xml file.

For example, the file 123.xml, which has the following contents

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Title>
  <PRMap>I_32c_T_A</PRMap>
  <IMP>HH</IMP>
  <Pszx>683</Pszx>
  <Pszy>560</Pszy>
  <PGszx>27.305</PGszx>
......

should be renamed to the value of the <PRMap> node, the 123.xml file will be renamed to I_32c_T_A.xml.

Solution

WatchDirectory does not directly support reading xml values, but we wrote a little helper program (GetFromXML.exe) to make this possible. The idea is to use the "Copy Files" task with the Dynamic Naming option.

One of the dynamic name tags allows you to call a batch script to determine (part of) the final name to use. This batch script can then read the xml file (using GetFromXML.exe) to extract the correct name to use.
Download GetFromXML here.

This is the batch script (GetFromXML.bat):

SET GET=C:\Bin\GetFromXml.exe
  
"%GET%" "%WD_FILE%" Title^|PRMap^|* > "%WD_FILTERRESULT%"
if %errorlevel% neq 0 (
  DEL "%WD_FILTERRESULT%"
  echo Error xml lookup in file fails > "%WD_FILTERRESULT%"
)

The script should be saved as C:\Program Files (x86)\WatchDirectory\Resolvers\GetFromXML.bat and now the customer can use the following "Dynamic Name" as the target for this copy files task:

C:\Target\{code{GetFromXml.bat,}}.xml

Sunday, 6 April 2014

WatchDirectory v4.8.7 released

Today we released an update for our Directory and File Monitoring program WatchDirectory. This update has the following fixes and improvements:

  • Improved: When WatchDirectory detects an illegal file or foldername (for example a Macintosh filename), WatchDirectory will use the so-called 8.3 (short) name instead of aborting.
  • Fixed: The new email implementation did not properly create HTML emails (embedding images did not work).
  • Improved: The upload task will not automatically try to "Resume" uploads, it is now an option you can set.

Download/Install

Download the new version here. Install it "on top" of your current version so WatchDirectory will see your settings and tasks. There is no need to uninstall your current version first.