Reputation: 33
I want to detect when a new file is added to a existing folder and access it.
How can I do this (C#)?
Thanks
Upvotes: 3
Views: 2791
Reputation: 653
Use the FileSystemWatcher class wich raises events when a file is created, updated etc.
Upvotes: 1
Reputation:
I am not a Windows dude, but generally speaking, find out if there is a Windows API call which allows you to watch a directory.
Upvotes: 0
Reputation: 10061
You should take a look at System.IO.FileSystemWatcher, this is the class you might want to use.
Upvotes: 3