In article <41***********************@dread16.news.tele.dk> , Poul
Møller Hansen <tu*@pbnet.dk> wrote:
I'm trying to make a solution that can listen for files in a given
directory,
and process the files as soon they have been written.
So far I'm executing the script once per minute, but I would like a realtime
scan for files.
Does any of you know how to start on this ?
Notification when a file is created sounds like an operating system
function, and I have never heard of any operating system offer this
function as a general feature. It is usually up to the processes
involved to notify each other when some event has occurred.
As a work around, I would just keep a script running all of the time
increase the frequency of checking. If you code the process
efficiently, you should be able to check every second. Of course, your
ultimate speed depends upon your hardware and your operating system. If
you want faster response, you are going to have to modify the process
creating the files so it can notify or spawn the process that wants to
know about the new files.
FYI: this newsgroup is defunct; try comp.lang.perl.misc in the future.
--
Jim Gibson
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---