WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Watcher

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Watcher Extender

 Keywords: monitor file files directory directories watch watcher 

The Watcher extender allows a WinBatch program to monitor up to ten windows directories. It will wait until a file in one of the directories is created or modified, and then returns with the name of the file.

[watcher.zip]

The watcher extender defines the following calls.

    WatchVersion   Returns version number of the extender
    WatchOpen      Tell the extender which directories to watch
    WatchWait      Wait until a file is changed or created
    WatchClose     Stop watching the directories
The extender also defines several constants

To use the Watcher extender in your program, add the line:

AddExtender("Watch34i.dll)
Note.
This extender is recommend for watching small directories. To identify changed files, it must a list of all the existing f iles in memory, and must scan the entire directory whenever a change occurs. For small directories this has very little impact on the system, but for very large directories the Watcher could use a significant amount of system memory and processor resources.
Article ID:   W16370
File Created: 2019:08:14:08:57:58
Last Updated: 2019:08:14:08:57:58