Stop batch from exit

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Stop batch from exit

#1 Post by Samir » 08 Jul 2014 11:55

I hate to bump an older thread, but I think I'm facing the same problem the OP had with the dos window automatically 'exiting'.

The batch file is just a single line with a for loop on it. I tried adding PAUSE after the for loop thinking that would stop the window from exiting, but it didn't. :?:

I tried to understand what was going on in option 3 in the OP's batch to see what kept the window open, but couldn't figure it out. Any ideas?

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Stop batch from exit

#2 Post by Squashman » 08 Jul 2014 12:24

I split off your question to a new thread.
Please post the code you are using.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Stop batch from exit

#3 Post by foxidrive » 09 Jul 2014 00:18

Samir wrote:The batch file is just a single line with a for loop on it.


To stop misunderstandings arising because of how you are using your code, please post this single line.

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: Stop batch from exit

#4 Post by Samir » 10 Jul 2014 23:17

It was a bigger problem. I got the window to stop closing using pause like normal. Thank you for the assistance! 8)

Post Reply