Does Windows Move command delete the file only on successful completion?

Posted by IronicMuffin on Super User See other posts from Super User or by IronicMuffin
Published on 2009-11-25T16:38:00Z Indexed on 2011/03/02 15:27 UTC
Read the original article Hit count: 212

Filed under:
|
|
|
|

This may be a stupid question, but I'm erring on the side of caution here.

If I'm using Windows command line/batch files to Move a file from one server to another and we have a network failure, what will happen to the original file?

I would assume it remains untouched until fully moved, and then deleted, but I need to be sure. My fear is that it deletes bytes as they are moved, which would be bad.

If that isn't the case, is there a better way than Copying the file and Deleting after the copy completes?

Thanks for your help.

EDIT: I suppose super user would have been better. This is part of a job kicked off by code, so my first thought was to come here.

© Super User or respective owner

Related posts about Windows

Related posts about command-line