Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9752

Add confirmation after executing ROBOCOPY command

$
0
0

I have started to use ROBOCOPY command a lot. I use ROBOCOPY source destination /MIR. Is there any way to add confirmation, "y/n" after the command is executed, but not actually ran. So I will type ROBOCOPY source destination /MIR and after I press enter there will be are you sure yes/no confirmation box. In that way if the command is executed by accident I can still stop it.

EDIT

I tried with .bat files, but can't figure out how to run confirmation after command is ran, I mean after I press enter on the keyboard to run ROBOCOPY and before ROBOCOPY actually run, so it pauses the command until I press y or n.

For cmd command that is so powerful they should add a flag to enable/disable this functionality.

EDIT

I can see that this is causing a big confusion, so let me explain how it should run:

C:> name_of_batch_file.bat source destination

{enter}

C:> are you sure y/n

{y}

C:>


Viewing all articles
Browse latest Browse all 9752

Trending Articles