The creation or deletion of a file within a directory is also counted as a change to that directory itself. That's the event that's being reported to you. Folder2
, itself, is within the directory that you're monitoring.
The reported path is the path of the directory, not the file within it, and you'll notice that its your Changed
handler being invoked, despite the fact that the file system operations are actually creation or deletion.
In your event handler, you could just check whether the reported path is a directory, and just return
and perform no further processing in the event handler, if that's the case.