Monitor FTP sites with WatchFTP Monitor FTP sites with WatchFTP


  screenshot of this window

Run a Batch Script

This feature is switched on using the Additional Actions page.

Use this page to configure the Task to run a batch script every time it downloads a file. The batch script can use Environment Variables.

Batch Script: The file containing the script.

As an example, suppose you want to run the program dbimport.exe for all newly downloaded files. Your batch script would look like this:

%WF_FILE% is an Environment Variable that is replaced by the complete path of the downloaded file. For example: C:\Syncdir\NewFile.txt.

Batch Script (Run after multiple downloads) This script will run only once after 1 or more files are downloaded (after a "session" of downloads). Please note that only the environment variables %WF_CONFIG% (the name of the task) and %WF_REASON% (set to the value AFTERDOWNLOADS) are set.

Please see Troubleshooting for some tips if you need to "debug" your script.