This "CHT Utility Application" illustrates a CHT template called EmbedFileNotifyFunctions and a new class called HNDFileNotify (HNDFILENOTIFY.INC/HNDFILENOTIFY.CLW).
The class attached to your procedure by this template, once initialized, gives your procedure the ability to detect all changes occuring in a nominated directory and, optionally, its subdirectories. Whenever a new file is added to the target area, or a file is changed, your procedure is sent an event called EVENT:FileChanged to signal that this has occurred. At that point, what you do as a programmer to act on that event is wide open.
This application illustrates one use of this powerful, directory monitoring capability. When a file is added to the designated source directory, that file is copied into a target directory somewhere else on the local network.
The file or files meeting the filter setting provided on the application interface, eventually then, end up sitting somewhere else on the network, for instance, in a server directory. There is also an optional switch to remove the processed source file(s) from the directory being monitored.
Any questions, feel free to ask.
Gus M. Creces
The Clarion Handy Tools Page
www.cwhandy.ca (CHT Website)
news.cwhandy.ca (CHT Forum)
JumpStartSplashCHTBlue (Procedure Template: Splash)
|(4) Class Instances Found In JumpStartSplashCHTBlue|
MainServiceWindow (Procedure Template: Window)
|(6) Class Instances Found In MainServiceWindow|