I was curious how the FileSystemWatcher worked and found the answer here very helpful. Since Windows raises a flag I wonder if I can effectively use FileSystemWatcher on a mapped drive that is on a remote machine? If so, what kind of permissions do I need? I only have access to part of the harddrive (the manufacturer of the machine did this so I can copy log files off the harddrive). I have no access to the OS on the remote.
Asked
Active
Viewed 1,240 times
0
-
Don't do it, poll the folders you are interested in instead. FileSystemWatcher to a share is not reliable. – user469104 Apr 22 '16 at 14:21
-
Would polling the folder cause extra wear on the hard drive of the remote machine? – Bill Greer Apr 22 '16 at 14:39
-
1Possible duplicate of [System.IO.FileSystemWatcher to monitor a network-server folder - Performance considerations](http://stackoverflow.com/questions/151804/system-io-filesystemwatcher-to-monitor-a-network-server-folder-performance-con) – Pieter Witvoet Apr 22 '16 at 15:11
1 Answers
2
FileSystemWatcher
is not 100% reliable under any circumstances, although it is usually acceptable with local folders. However, network shares can disconnect, have added latency, isn't being completely monitored by your local client Windows, etc.
Polling is about the only reliable way to check the folder. "Wear and tear" is not a problem since there are plenty of other processes, including Windows, that do a much higher amount of I/O. Also, drives are cheap.

Chris Fannin
- 1,284
- 1
- 10
- 16