I have used FileSystemWatcher for a few script to monitor the filesystem. It is working correct. Only haeavy loads can be a problem because of a buffer overrun. A few useful tutorials I used:
https://mcpmag.com/articles/2015/09/24/changes-to-a-folder-using-powershell.aspx
http://www.mobzystems.com/code/using-a-filesystemwatcher-from-powershell/
Some more information about de buffersize:
https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.internalbuffersize(v=vs.110).aspx
No comments:
Post a Comment