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

Updated: 01/24/2018 by Computer Hope

aborting batch fileWhile 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.

Ctrl+C

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

Ctrl+Pause/Break

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.

Ctrl+Alt+Del

Finally, if you're still unable to abort the batch file, command, script, or other 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.

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

Additional information