Typically, a copy program does this in blocks, and not in a complete file at the same time. I do not think that you can do everything to avoid this, you will have to accept your algorithms to deal with it.
You can try to open a file with exclusive read rights, which should be granted to your program only when another program has finished copying and closed the file. Otherwise, you will get an IOException, and you can wait for the next change. But this does not mean that you should not deal with multiple change events. Opening a text file in Notepad and saving it once in a while will generate change events, but the file will not be locked all the time.
Another approach is to collect the affected files for a certain period of time, and when FileSystemWatcher stops generating events, process all the files at once.
source share