How to say no to all “do you want to overwrite” prompts in a batch file copy?

后端 未结 14 1279
感动是毒
感动是毒 2020-12-23 11:36

By default, copying from the command prompt will prompt you to overwrite files that already exist in the target location.

You can add \"/Y\" to say \"Yes to all\" re

14条回答
  •  轮回少年
    2020-12-23 12:03

    I know you all think /D: date is going to use date stuff, but just /D without the: does exactly what we want so...

    xcopy {Source} {Destination} /E /D 
    

    Will copy without overwriting to pickup those files that are new or maybe failed before for some reason.

    Just try it, it works.

提交回复
热议问题