FileSystemWatcher watching MyComputer
Hello,
i'm trying to configure a FileSystemWatcher component to watch my whole system(a PC) for file changes. My problem is that the biggest thing i can configure it to watch is a drive - C:\ for example. I want to make it track changes on all system drives at the same time. I thought that i can use a path like this:
this.fileSystemWatcher1.Path =
Environment.GetFolderPath(Environment.SpecialFolde r.MyComputer);
or ... .Desktop);
but it doesn't work, because it seems that .MyComputer special folder doesn't give a path that the FileSystemWatcher can use and .Desktop gives a path to ...\Username\Desktop, where only the files on the desktop are found and not MyComputer as a subdirectory.
Can you please tell me how to 'watch' all the drives on My Computer?
Thanks in advance.
Alex
|