Answer the question
In order to leave comments, you need to log in
How to track changes in C# folder?
Tell me how best to track changes in a folder (network drive), it is necessary that when any files are changed, the program can determine which ones have changed, while each time not scanning the size or modification date of 6700 files :)
Answer the question
In order to leave comments, you need to log in
It's strange, but MSDN writes that it works over the network
Perhaps you have a problem with this?
Windows notifies the component of changes to files in the buffer created by the FileSystemWatcher object. If there are many changes in a short time, the buffer may overflow. As a result, this component will not be able to track changes in the directory and will only give general notifications. Increasing the buffer size using the InternalBufferSize property has a lot of overhead because it is not paged and cannot be paged from disk, so the buffer should be kept as small as possible while still being large enough not to miss any -or events related to file changes. To resolve a buffer overflow, use the NotifyFilter and IncludeSubdirectories properties to filter out unnecessary notifications.
Excuse me, but what is the task initially, maybe the solution to the problem should be changed to a more appropriate one, for example, enable regular windows system audit of access to files, edit and delete them and process system reports from c#?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question