I have an event receiver which works fine (triggering only once) when I drag and drop a file to a document library. It also works fine using the upload button, it will trigger twice as there are two step (upload then metadata update). Moreover, when using windows with explorer view, it will trigger thrice(one add and two update).
I am trying to rename my file and did the 2 options (renaming via updating the "Name" or via SPFile.MoveTo()) both of which is working fine in drag and drop and upload button. But when I am using open with explorer, it triggers the event receiver twice and failed to do a "rename". I run on debug mode to try and see if I execute only one event receiver will be correct, but it appeared not. What happened is that it created a new file with no content while still retaining the original file. It did complete the first event receiver execution.
Quite confusing as it worked well via the SP UI.