有没有办法强制复制?没有覆盖提示的复制,使用 Windows?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11264231/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:39:05  来源:igfitidea点击:

is there any way to force copy? copy without overwrite prompt, using windows?

windowscommand-line

提问by iCodeLikeImDrunk

I want to write a list of windows commands(it's a long list) where it does all these magical things for me, but whenever I use copy, it stops to ask fro overwrite prompt. When I type yes, it overwrites the old file then just stops there.

我想写一个 Windows 命令列表(这是一个很长的列表),它为我完成所有这些神奇的事情,但是每当我使用副本时,它都会停止询问覆盖提示。当我输入 yes 时,它会覆盖旧文件,然后就停在那里。

How do I make it such that whenever the windows sees the copy command, it just overwrites the old file without that prompt?

我如何做到这一点,只要 Windows 看到复制命令,它就会在没有该提示的情况下覆盖旧文件?

回答by SLaks

You're looking for the /Yswitch.

您正在寻找/Yswitch

回答by Bashar Jebry

MOVE /-Y Source Destination

MOVE /-Y 源目的地

Note:/-y will make the announcement of yes/no for overwrite

注意:/-y 将宣​​布是/否覆盖