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?
If you are copying files using drag-drop or copy/paste, you may simply choose “Skip this file” or “Skip these files” option to not overwrite the files that are already existed at the destination folder.
All you have to do is hold down the Shift key while you click on no. It has the same effect as saying No To All which means that the copy process from that moment on will automatically select no if a duplicate file is found in the destination directory.
By default, you are prompted to overwrite, unless you run xcopy from within a batch script. The last part after second comma is not true for command XCOPY. This part is only true for command COPY. The option /Y must be specified for XCOPY to prevent the overwrite prompt even on usage of XCOPY from within a batch file.
You're looking for the /Y
switch.
MOVE /-Y Source Destination
Note:/-y will make the announcement of yes/no for overwrite
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With