The following command copies and moves a file but I also need it to overwrite the file it\'s replacing.
xcopy /s c:\\mmyinbox\\test.doc C:\\myoutbox
For copying one file to another directory overwriting without any prompt i ended up using the simply COPY command:
copy /Y ".\mySourceFile.txt" "..\target\myDestinationFile.txt"
If the copy command is run from within a batch job you do not need to use the /Y switch: it will overwrite existing files.
You can use :
copy /b/v/y
See SS64 on COPY.
You can refer Windows command prompt help using following command : xcopy /?