FileSystemWatcher Change event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

I use FileSystemWatcher.Changed event to capture an excel workbook being saved. Since the save button in excel is always enabled and each time click save the workbook is saved again and its modified time will be the current time. It seems that the file watcher changed event is not fired if the workbook has no changes since last save although the workbook last modified time has been changed.

Any ideas

Thank

Jie
 
Hi,
Hi

I use FileSystemWatcher.Changed event to capture an excel workbook being
saved. Since the save button in excel is always enabled and each time
click save the workbook is saved again and its modified time will be
the current time. It seems that the file watcher changed event is
not fired if the workbook has no changes since last save although the
workbook last modified time has been changed.

Any ideas,

Thanks

Jie

Are you sure that "Path" (and optionaly "Filter") has right settings?

Did you set "NotifyFilters" to wanted event ("LastWrite") and
"EnableRaisingEvents" to true?

Regards

Marcin
 
Yes, Marcin. I have set the necessary settings correctly. The strange thing is that some times the FileWatcherChanged event is captured(e.g., the first time I click the save in Excel) some times not (if I click the save button again.). I guess this is a bug in FileSystemWatcher Framework class.
 
Back
Top