Fog Creek Software
Discussion Board




win XP directory update triggers event

On windows XP, I want to write a program that sends me an email (or triggers some other procedure) whenever the contents of a shared drive are changed.  Is there any handy built in API call to do this, or any pre built component that does this? Or is the solution to just poll the directory every N seconds and then alert upon change? 

thanks!

rz
Wednesday, September 03, 2003

Yes, you can register your window to receive messages from the windows shell on specific events -- see  http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_intro.asp , and maybe start with SHChangeNotifyRegister.

Rick
Wednesday, September 03, 2003

.NET Framework Class Library 
FileSystemWatcher Class

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiofilesystemwatcherclasstopic.asp

is one approach.

AEB
Wednesday, September 03, 2003

filesystemwatcher is what i want. Thanks!!!

rz
Wednesday, September 03, 2003

*  Recent Topics

*  Fog Creek Home