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

后端 未结 14 1227
感动是毒
感动是毒 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:06

    Depending on the size and number of files being copied, you could copy the destination directory over the source first with "yes to all", then do the original copy you were doing, also with "yes to all" set. That should give you the same results.

    0 讨论(0)
  • 2020-12-23 12:07

    this works fine

    no | cp -rf c:\source c:\Dest\
    
    0 讨论(0)
提交回复
热议问题