score:2

Accepted answer

Your code is right, try to create directory with console and MKDIR, it will work. If you create a directory from Explorer its first created as "New folder" and then renamed.

From Microsoft web: copy and paste is interpreteds as rename https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher.notifyfilter?view=netframework-4.8

The operating system and FileSystemWatcher object interpret a cut-and-paste action or a move action as a rename action for a folder and its contents

From the same docu, events can raise multipletimes:

Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised.


Related Query