How to copy files to a destination, then delete the source files using a batch file/script?

49 views Asked by At

I'd like a batch file that can copy all files in a source folder to a destination folder, then delete only the source files which copied successfully. The script should overwrite any existing files at the destination.

I tried making a batch file using xcopy and delete, but the result is not what I want it to be; it deletes all source files even if a copy operation fails. I need any uncopied files to be left behind in the source folder.

Thanks in advance for your answer and response.

0

There are 0 answers