?
Solved

How do I stop a batch file?

Posted on 2003-03-13
4
Medium Priority
?
5,532 Views
Last Modified: 2007-12-19
One quick question

How do I stop a batch file while it is running?





 
0
Comment
Question by:Other_user
4 Comments
 

Expert Comment

by:KLOPEKS
ID: 8132909
Press the Pause/Break button.
0
 

Accepted Solution

by:
pjbcba earned 80 total points
ID: 8133323
- Do you mean pause it so it can be resumed, or completely end the script?
 - Do you mean manually from the keyboard..., or from within the script itself?

manaul pause - as above, Pause key to hold, Enter key to continue.

scripted pause - use the PAUSE command in the script to produce the "Press any key to continue" prompt

manaul end - CTRL-C, or CTRL-Break (depends what the batch file is doing as to whether this will happen immediately or not)

scripted end - use the command GOTO END, and the last line of your file is :END

0
 

Expert Comment

by:easoccer
ID: 8134043
Also try CTRL-S if you mean to pause. Any key will resume.
0
 

Author Comment

by:Other_user
ID: 8136163
I meant a way to stop the batch file while is still running (stop it from the keyboard rather than the batch file itself)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Integration Management Part 2
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question