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

WindowsCommand Line

Windows Problem Overview


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.

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

Windows Solutions


Solution 1 - Windows

You're looking for the /Y switch.

Solution 2 - Windows

MOVE /-Y Source Destination

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioniCodeLikeImDrunkView Question on Stackoverflow
Solution 1 - WindowsSLaksView Answer on Stackoverflow
Solution 2 - WindowsBashar JebryView Answer on Stackoverflow