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

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

    You can make a text file with a single long line of "n" then run your command and put < nc.txt after it. I did this to copy over 145,000 instances where "No overwrite" was what I wanted and it worked fine this way.

    Or you can just hold the n key down with something, but that takes longer than using the < to pipe it in.

提交回复
热议问题