View Full Version : creating .bat files...
attgig
11-07-2001, 01:12 PM
Hey, I'm trying to make a bat file that runs a script (which has some output). The problem is that once it finishes executing (not from cmd prompt, but using explorer), the cmd window closes right after it's done...
So, Does anyone remember how to get the window to stay open after it finishes executing?
Markel
11-07-2001, 01:21 PM
Add a line at the end that says:
pause
topane
11-07-2001, 01:57 PM
I think there's a "close on finish" checkbox also, at least in Win9x.
attgig
11-07-2001, 02:03 PM
pause doesn't seem to work :(
I'm on windows NT.....does that make a difference?
Markel
11-07-2001, 02:37 PM
Originally posted by attgig
pause doesn't seem to work :(
I'm on windows NT.....does that make a difference?
I am on NT as well. I had to create a .bat file to run a DOS app that generates ID numbers for our software. Once we got into Windows, the generated code would disappear with the DOS window after it ran (and before I had a chance to read the resulting code). So I created a .bat file with two lines:
<run the exe>
pause
Once the exe finishes, the DOS window sits there saying "Press any key to continue . . ."
hapoo
11-07-2001, 03:21 PM
well you could always just run it from the command prompt instead of double clicking on it.
Jeffbx
11-07-2001, 07:19 PM
Or send the output to a text file:
@echo off
<run the exe> > c:\textfile.txt
Originally posted by Jeffbx
Or send the output to a text file:
@echo off
<run the exe> > c:\textfile.txt
even better:
@echo off
<run the exe> > c:\textfile.txt
notepad c:\textfile.txt
This'll automatically open the text file in Notepad.
-OC
Jeffbx
11-09-2001, 05:25 AM
Originally posted by overclocked
even better:
@echo off
<run the exe> > c:\textfile.txt
notepad c:\textfile.txt
This'll automatically open the text file in Notepad.
-OC
Hey hey! Getting fancy here!
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.