FileSystemWatcher – LastAccess Not Working
To have System.IO.FileSystemWatcher LastAccess work, the system must have access logging enabled with the following command. fsutil behavior set DisableLastAccess 0 After setting this, reboot, and you can successfully use the FileSystemWatcher to monitor LastAccess of files (sorta). Example Code FileSystemWatcher lWatcher = new FileSystemWatcher(@”C:\windows\temp”, “*.*”); lWatcher.NotifyFilter = NotifyFilters.LastAccess; lWatcher.EnableRaisingEvents = true; lWatcher.Changed += new…
Read More FileSystemWatcher – LastAccess Not Working