I'm writing a batch program for copying all files newer than the destination from "C:\Users\ADMIN\Desktop" to "D:\Backup".
This code is works:
xcopy "C:\Users\ADMIN\Desktop\*.*" "D:\Backup\" /K /D /H
However, it asks for each existing destination file: Overwrite file [Yes / No / All]?
I want to overwrite all existing destination files without user intervention.
How can I solve this?
/Y
option.XCOPY/?
at the Command prompt, hit enter and read the help information on the command. Or better yet, try it withROBOCOPY/?
which supersededXCOPY
way back when Windows Vista came out!ROBOCOPY
if the users are not computer oriented (i.e. if they can't find the/Y
switch fromxcopy
help screen). There are several complex details there.../Y
, its good!