I would like to know how Windows behave in that case.
It closes and cancels and removes the parts of the file it didn't fulle transfer from target source only if it is a controlled cancellation (e.g. you press cancel, or Windows enforces a cancel for some reason)
A crash is not considered a controlled cancel, but as Lister said, Windows won't delete a file until it is actually (fully) transferred.
On an uncontrolled cancel corrupt/incomplete files may be present on the target destination. The safest way to address it is to simply move the remaining files in the source-storage and tell Windows to REPLACE duplicates.
Note though, that data loss still might have occurred, since the file transfer also has complicated hardware-wise factors that the operating system can't control/monitor in every aspect (such as HDD internal cache etc).
I'm really interested to know how a potential data loss can translate,
assuming it crashed while copying a txt file of a few bytes - missing
file ? Corrupted file?
It all depends on what kind of file it is and how and what for it is used.
As an example: a text file may still be readable, yet some part of it missing. This could be alright, unless this text file is used by some program to read setting or other stuff that might crash the program if incomplete.
You can't really know for sure if there's been any data-loss if you don't have the original set of files to compare total amount of files, exact total size etc.
I see, so there is no way to know if the crash resulted in lost data ? – Chatai – 2016-08-04T13:50:40.433
If you had a backup to compare with you could compare it, but otherwise it appears not. Its a good idea to copy and paste yourself, then delete after. – Lister – 2016-08-04T13:52:44.327
So it is possible that some entire files (small text files for instance) got deleted after the crash and are lost in a result ? The system is deleting the whole file instead of corrupting it ? – Chatai – 2016-08-04T14:23:37.260
Its possible but you should be safe. As Avirk said, windows copy's the file and after the copy is completed it deletes it. Working on that principle only files which were completely copied should be deleted. I only say you cant be sure because without an original to compare against you cant tell the difference! – Lister – 2016-08-04T14:28:04.450
Since it only deletes After the current file copy is completed a crash will not delete data during a cut-paste. – Moab – 2016-08-04T21:24:38.957