?
Solved

How do I stop a batch file?

Posted on 2003-03-13
4
Medium Priority
?
5,518 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

765 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