FileWatcher Version 3.0.0
FileWatcher version 3.0.0
The Cadacus File Watcher Service will watch a directory for filenames that end in ".fw". These files will then be transferred to a Windows Printer without going through the print driver. This allows formatted files to be sent directly to a Windows printer. The program is designed to be used with the Shipping Solutions labeling service as a alternative to using Rawprint or the direct queue mechanism or with the e.Net business objects over webservices.
Download the FileWatcher Installer
Click here to Download File Watcher 3.0.0 Installer Released : February 23, 2016
- Filewatcher requires Microsoft.Net Framework 4.0; for more details on .Net Framework versions and links, see steps 2 and 3 here.
- If an older version of Filewatcher is already installed, please follow the installation steps below to prevent the following
Install the FileWatcher service
- Determine if FileWatcher is already installed, and if so, check the program version via "Programs and Features" in the Windows Control Panel as follows:
- If the first number in the program version above is less than 3.x.x (e.g., 2.x.x), the old FileWatcher version must be uninstalled before installing the new version as shown below. However, if there is no "Cadacus FileWatcher Service" already installed in Programs or if there is a version there and the version number starts with "3", then skip the uninstall step here and go to the next step of these instructions.
- For uninstalling previously installed FileWatcher versions less than 3.xx (e.g., 2.x.x), go to Windows Control Panel--Programs and Features and uninstall the "Cadacus FileWatcher Service" as follows:
- Run "Regedit" from the Windows Run prompt (on the keyboard, press the Windows key and the "R" key simultaneously), for example:
- FileWatcher versions prior to 3.x.x were 32-bit Windows applications, so once in Regedit, go to HKEY_LOCAL_MACHINE--> SOFTWARE--> Cadacus--> FileWatcher to see the registry entries and values.
Note: if the Cadacus--> FileWatcher registry keys are not found at that location and if the server is a 64-bit machine, please check the registry for 64-bit machines at: HKEY_LOCAL_MACHINE--> SOFTWARE--> WOW6432Node--> Cadacus--> FileWatcher.
- Find and make note of "old" FileWatcher registry keys. If the "old" FileWatcher's directories and paths are desired to also be used in the new FileWatcher version, take a screenshot and/or write down all the registry keys and values, as the "old" version's directories and paths must be manually transferred to settings in an XML file containing the newer FileWatcher's (version 3.0.0) settings. Then follow the steps (further below) describing the manual transfer of the old values subsequent to the downloading and installation of the FileWatcher version 3.0.0 program. The following is an example of a screenshot taken of the registry keys from the "old" version of FileWatcher (2.x.x) as seen in the registry for 32-bit applications (as noted above, alternatively look for the WOW6432Node registry path for 64-bit machines):
- On the application server, download the FileWatcher 3.x.x Installer from the link at the top of this page and run it.
- Open the application configuration file: as noted above, the "old" version of Filewatcher (2.x.x) stored application settings in the Windows registry; however, the new version of Filewatcher (3.x.x) uses what is called an "application configuration file" to store application settings controlled by the user. The application configuration file is a text file (FileWatcherService.exe.config) stored in the same directory as the new FileWatcher application program (example below). Use any text editor to open this file for editing.
- The initial application configuration file settings must be tailored according to whether the installation is upgrading from FileWatcher 2.x.x (i.e., the "old" version) or is a first-time FileWatcher (3.x.x) installation. Accordingly, choose one of the two following:
For upgrading existing FileWatcher 2.x.x installations:
FileWatcher versions prior to 3.x.x stored application configurations in Windows registry keys. To migrate the configuration settings from the registry to the new application configuration text file, follow the example below. If the Crystal Report interface from the old Filewatcher (version 2.x.x) is being used, this capability must also be migrated to the enhanced Crystal Reporting Service explained in this (coming soon) tutorial.
Please note some other settings from the registry may not exist in the new application configuration file and may be safely ignored.
When all registry key/values have been migrated to the new application configuration file, it is recommended to remove the FileWatcher registry entries, e.g.:
For first-time FileWatcher 3.x.x installations:
Edit the FileWatcher application configuration text file. See the example default file (FileWatcherService.exe.config) below, stored at the default location (C:\ProgramFiles\Cadacus\FileWatcher\):
The application configuration file above contains default settings in the key/value format. See the setting descriptions below and optionally change the default values, if desired
- key="Directory": This is the default directory created by the installation (C:\FileWatcher\watch) which is being watched by the FileWatcher service. When print files ending in .fw are dropped in this directory, the FileWatcher service recognizes a new .fw file has been placed there and processes the content of the .fw file as label print data to be passed to the print queue. If a different default watch directory is desired, change the path value in this key.
- key="QueueTranslation":The Queue Translation file is just a text file containing translation lines or commands with one entry per line (see further below for more details). The primary purpose of the Queue Translation file is to provide the option of assigning a specific shipping station or handheld to a physical printer. The default name value of the queue translation file is "queues.txt". If a queue translation file name different from the default is desired, enter it in the corresponding key value here.
- key="SavePath": This is the default directory for saving archive copies of the .fw files processed by the service.
- key="Delete": Accepts values of "true" or "false" and determines whether .fw files are saved or deleted after processing. Note: this key value should always be set to "true", unless testing is being done.
- key="Debug": Adds additional information to the logs (NoDebug is the default).
- key="FileLog": Logs information to the file designated by <filename> (NoFileLog is the default).
- key="EventLog": Logs information to the Windows System Event Log; (NoEventLog is the default).
- Start the service "Cadacus File Watcher" in the Administrator Services Control Panel. The service will automatically start the next time the system is restarted. The services control panel can also be used to start the service manually.
Format the FileWatcher file name
The filename must use the following format:
||The directory FileWatcher is watching
||Tells FileWatcher to transfer the file to a Windows Print Queue
||The Windows Printer name
||Any unique filename
||The required suffix. Only files with this suffix are processed
Using FileWatcher from a Label Control file
Configuring a label control file to use FileWatcher requires two steps.
- Remove any lines starting with [QUEUE]
- Add or modify the line starting with [FILE] to output the label to the filewatcher directory using the proper filename syntax.