Wayne Stallwood writes:
What is the most efficient way to "watch" a folder for a particular file pattern, if I have a looping "if exist" script is this likely to consume lots of resources as surely it would be continuously polling the disk to check for that file.
You could use `sleep' to suspend your script for a few seconds within the `if exists' loop. I had to do something similar in the past and my preferred solution was to use tclsh as I was able to time how long the file copying took and then sleep (`after' in Tcl) for an amount of time that made the copying happen at regular intervals. (Please: no rants about my choice of scripting language!) HTH. ..Adrian -- Dr Adrian F Clark WEB: http://privatewww.essex.ac.uk/~alien/ EMAIL: alien/at/essex.ac.uk TEL: +44 1206 872432 FAX: +44 1206 872900 PAPER: VASE Lab, Dept ESE, University of Essex, Colchester, CO4 3SQ,UK "The great tragedy of science: the slaying of a beautiful hypothesis by an ugly fact" -- Huxley