when i use a file system watcher changed event for a notepad it occurs once,but the event occurs twice for a word pad,please give me the reason.i launch using explorer
A bit Briefly,
I have a file named “xxx.log” it contains some strings,i wrote a filesystemwatcher which will watch this file for size(notifyfilter – size) changed.whenever
i opened the file with notepad the changedevent occurs once,whenevr i do it with wordpad
the event occurs twice what is the reason. i open files using explorer.exe.
how to handle this problem.i need the event once only,is there any way
I think that notepad has no lock/backup file handling. Thus it writes only once to the file – Word and Wordpad work with some temporary files for backup and locking purposes and for that reason they might write twice.