Another simple solution would be to copy the file to a working name and then rename to the correct name after the copy has completed. For instance, copy 'fred' to '_fred'. Then rename '_fred' to 'fred' after the copy has completed. If these are done in series, the copy will be completed before the rename is done.