> So I am looking for more suggestions. Perhaps Ian or Andy has
I don't, other than mentioning that Dolphin 6 might have something that
would probably work for you. The following is from the class comment
FileSystemChangeReader is a class of objects that can be used to monitor
the file system for changes occurring in a specified directory, and
(optionally) its sub-directories. The directory can reside on the local
computer, a network drive, or a remote computer, as long as the
computers concerned are not running Windows 9x (which does not support
the necessary Win32 API).
FileSystemChangeReader employs the ReadDirectoryChangesW API to request
directory monitoring, and uses Win32 overlapped I/O in conjunction with
asynchronous procedure calls to receive the notifications. By utilising
Dolphin's generic callback mechanism overlapped I/O APCs are simple and
efficient, however because they are received when Dolphin enters an
alertable wait state, they will normally be processed by the idle
process when it issues a MsgWaitForMultipleObjectsEx call to quiesce the
FileSystemChangeReader itself is abstract, and has subclasses that
publish the file system notifications either as Smalltalk events on the
main UI thread (FileSystemWatcher), or by pushing them onto a
SharedQueue for processing by a background thread (FileSystemChangeReader).
To monitor the entire contents of a directory and its sub-directories,
pass the name of the directory with or without a terminating back slash,
FileSystemWatcher monitorDirectory: 'c:\temp'
To monitor a specific file set up a monitor on the directory and then
set the filename as the filter, for example:
fscr := FileSystemChangeReader directory: 'c:\temp'.
fscr filterString: 'blah.txt'.
[[| change | change := fscr next. Transcript print: Time now; display:
': '; print: change; cr] repeat] forkAt: Processor userBackgroundPriority.
A range of files matching a wildcarded filename, or filenames, can also
fsw := FileSystemWatcher directory: 'c:\temp'.
fsw filterString: '*.txt;*.doc'.
The filters can also be set using the #filters: method and passing an
array of strings as its argument.
The #watchSubDirs flag allows control over whether the watcher will also
monitor for changes in files matching the filter in sub-directories.
It is possible to mask out certain change events (which one might want
to do if monitoring a frequently updated directory), or receive more
detailed changes events (such as changes to file sizes, and even the
time of last access) by setting the #notificationMask. By default a
FileSystemWatcher will report the addition, modification, removal and
renaming of files.
N.B. If you monitor a directory such as c:\Windows\ or :
c:\Windows\System32, you may start to receive so many notifications that
system performance is impacted. It is advisable to consider carefully
before monitoring any directory.
Use the Reply-To address to contact me.
Mail sent to the From address is ignored.