Hey everyone,

I'm attempting to monitor a directory, including subdirectories, for changes and update a database. The database part I can do, I just cant figure out how to monitor the directory for changes.. any suggestions? Is there an easy way to do it like function.getChanges(directory)?? Microsoft seems to make things way to easy like that sometimes and maybe I'm just missing it.

Thanks,
barefoot

Recommended Answers

All 2 Replies

You are quite right. There is a control called FileSystemWatcher that you can use. Unfortunately, this computer only has Visual C++ installed, so I can't really give you an example in C# (having never used the control before).

I'm not sure about the control's availability for WPF applications, but it i definitely there for Windows Forms.

Thanks for the help. I searched FileSystemWatcher and found just what I need. Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.