SHFileOperation FO_MOVE deletes a file if the destination drive is full
- by Shailesh Kumar
I had a piece of code which uses windows SHFileOperation function with FO_MOVE operation. Additional flags specified were FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT.
A particular weird behavior was observed when the destination drive was full. In this case, MOVE could not place the file in destination folder but the source file was also lost. This was highly unexpected and this caused a loss of data.
Is this the standard behavior of SHFileOperation?
Can we have something like MOVE if the destination drive has space otherwise leave the file at the original place?