Poll a folder for new files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know this isnt the correct forum but its is kinda related.
Does anyone have any samples or links to some sample code that will poll a
folder for new files.

I am building an app which will keep an eye on a folder for any new xml
files and will then read the files in to the app etc.

Thanks
 
Take a look at the FileSystemWatcher class in the System.IO namespace.
 
Be a bit careful of it. There have been reports of it failing to pick up
changes to rapidly changing directories - not sure if its been f ixed in net
2.0

Regards

John Timney (MVP)
 
thanks for the tip, it should be ok so, the directory will only be getting 10
or so files a day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top