I have written a test app to try out the FileSystemWatcher example code from msdn.
It basically works but the handler gets called three times. Does any one know why?
namespace FileWatcherTest
{
    public partial class Form1 : Form
    {
        private FileSystemWatcher watcher;
        public Form1()
        {
            InitializeComponent();
            string testPath = 
                Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) 
                + @"\Test";
            InitialiseFileWatcher(testPath, "example.txt");
        }
        private void InitialiseFileWatcher(string path, string fileName)
        {
            watcher = new FileSystemWatcher();
            watcher.Path = path;
            watcher.NotifyFilter = NotifyFilters.LastWrite;
            watcher.Filter = fileName;
            watcher.Changed += new FileSystemEventHandler(OnFarmListChanged);
            // Begin watching.
            watcher.EnableRaisingEvents = true;
        }
        private static void OnFarmListChanged(object source, FileSystemEventArgs e)
        {
            string text = "File: " + e.FullPath + " " + e.ChangeType;
            MessageBox.Show(text);
        }
    }
}
 
     
    