Specifies which files should trigger a FileChanged event.
If wildcards are used, then only
the files that
exist at the execution of
are considered. Other files
that are added later (even though they might match the filter),
Multiple watches can be created, with the later ones being added to the list (rather than replacing the existing one).
// create global fileChanged event handler addGlobalEventHandler ["FileChanged", "systemChat format['fileChanged: %1',_this]"]; // specify which file to watch fileWatch "d:\bi\tst.txt";
// watch any .log files in the installation folder fileWatch "*.log";
|See also:||fileUnwatch, FileChanged|
|Problems:||File that are watched cannot be deleted (or moved, or renamed). In V3.x, this lock is released once the file is fileUnwatch, but in V2.x even that|
|does not help, and VBS may have to be restarted to release a locked file.|