watchDirectory Help

Help Home
Creating New Tasks
Running Tasks
Task History

Plugins

Standard versus Pro
Version History

Search

See Also...




Free 30 day evaluation!
Standard version: $79 USD
Professional version: $149 USD
Buy Now!

 

German Helpfile

German Helpfile

French Helpfile

French Helpfile

Spanish Helpfile

Spanish Helpfile


Privacy Policy

Automatically run .bat files - Using the wdAnnotate program


When you use the .bat file plugin, you may want to write information to the Task History from inside your script. The wdAnnotate program, installed inside the "plugins" subdirectory of watchDirectory, can be used for that. To make starting this program easier, the Environment Variable ANNOTATE is set to the complete path of this program.
Important: this program should NEVER be used when you have set the option Don't wait for .bat files to complete!!

Writing to the Task History

Writing to the task history database is very easy with this program. Inside your .bat file you can just enter a line like:

%ANNOTATE% info "Starting to convert file %WD_FILE%"

The above will write an "informational" message to the history database. As the message is written to the database "below" the current file system event, the inclusion of the %WD_FILE% variable inside the message is not strictly necessary.

The first parameter you pass to the wdAnnotate program is used to determine what kind of message should be written to the database. Depending on how you configured your task (see the Other tab) some messages may be ignored. Your choices for the kind of messages are:

If you don't want the messages to show under the current event, but with the messages of the current run, prefix the message type with an exclamation mark (!). For example:

%ANNOTATE% !info "Starting to convert file %WD_FILE%"