John,
As others have pointed out, you should use the FileSystemWatcher class.
Running a service is not inefficient, really. If anything, you can run the
service and then have your FileSystemWatcher instance wait for events from
the file system.
Also, you might want to check out BizTalk, as it has an adapter for
watching a directory for files.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"JohnSouth" <Jo**********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi
I've a requirement to run a database update process whenever an XML
file is copied into a particular directory.
I could create a program to run as a Windows Service that keeps looking
into the directory, but that seems rather inefficient. Is there a
better way of triggering a process when a file arrives?
I'd appreciate any suggestions.
John South
www.WhereCanweGo.com
Pangbourne UIK