Windows Command Line – How to Suppress Terminate Batch Job Confirmation

batchcommand linewindows

In cmd, when we press Ctrl+C we get the target application terminated but if the target application is called from a batch file, we get this "Terminate batch job (Y/N)" confirmation. I can never remember an instance where I chose not to terminate the batch job. How can we skip this confirmation?

Best Answer

AFAIK you can't as this behavior is by design and controlled by the command interpreter. There is no method of "mapping" or even "intercepting" this unless you de-compile and recompile the interpreter directly.

Related Question