I\'m monitoring a folder using a FileSystemWatcher like this:
watcher = new FileSystemWatcher(folder);
watcher.NotifyFilter = NotifyFilters.Size;
watcher.Cha
You indeed need a thread that would open all files and read a byte from them, my program stopped working after I ran it on Windows 7 instead of XP, I used the following code
private void SingleByteReadThread(object notUsed)
{
while (true)
{
foreach (FileInfo fi in new DirectoryEnumerator(folderPath))
{
using (FileStream fs = new FileStream(fi.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
fs.ReadByte();
}
Thread.Sleep(TimeSpan.FromSeconds(2));
}
}
DirectoryEnumerator is my own class