Aborting a batch file, command, or other programs stuck in a loop

Updated: 01/24/2018 by Computer Hope
aborting batch file

While working on your computer, you may encounter a situation where a program, batch file, script, or command executed on the computer becomes stuck in a loop. Listed below are different methods for aborting these loops.


One of the most universal methods of aborting a batch file, command, or another program while it's running is to press and hold Ctrl+C.


Similar to Ctrl+C, pressing Ctrl+Pause/Break key will abort almost all batch files, commands, scripts, or other programs.

Close Window

If after trying the above two suggestions, you're still unable to abort and the program is running in a window mode, click the X to close out of the window.


Finally, if you're still unable to abort the batch file, command, script, or another program, press Ctrl+Alt+Del keys at the same time to open the Task Manager. Highlight the program you want to end and click the End Process or End Task button.


See our End Task page for further information about help with this process.

Additional information