[Log In ] [New Posts] []
Go Back   GotApex? Forums Forums > General Topics > Software, OS, and the Internet
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-07-2001, 02:12 PM   #1
attgig
Chief of Naval Operations
 
attgig's Avatar
 
Join Date: Jun 2000
Location: the burbs of baltimore
Posts: 11,924
Send a message via ICQ to attgig Send a message via AIM to attgig Send a message via MSN to attgig Send a message via Yahoo to attgig
creating .bat files...

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?
__________________

attgig is offline   Reply With Quote
Old 11-07-2001, 02:21 PM   #2
Markel
Chief of Naval Operations
 
Markel's Avatar
 
Join Date: Feb 2001
Posts: 11,733
Add a line at the end that says:
pause
__________________
stay low... keep moving...
Markel is offline   Reply With Quote
Old 11-07-2001, 02:57 PM   #3
topane
turducken all the time
 
topane's Avatar
 
Join Date: Dec 2000
Location: Between the wheels
Posts: 5,055
Send a message via AIM to topane
I think there's a "close on finish" checkbox also, at least in Win9x.
__________________
Shall we buy a new guitar?
Shall we drive a more powerful car?
topane is offline   Reply With Quote
Old 11-07-2001, 03:03 PM   #4
attgig
Chief of Naval Operations
 
attgig's Avatar
 
Join Date: Jun 2000
Location: the burbs of baltimore
Posts: 11,924
Send a message via ICQ to attgig Send a message via AIM to attgig Send a message via MSN to attgig Send a message via Yahoo to attgig
pause doesn't seem to work
I'm on windows NT.....does that make a difference?
attgig is offline   Reply With Quote
Old 11-07-2001, 03:37 PM   #5
Markel
Chief of Naval Operations
 
Markel's Avatar
 
Join Date: Feb 2001
Posts: 11,733
Quote:
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 . . ."
Markel is offline   Reply With Quote
Old 11-07-2001, 04:21 PM   #6
hapoo
Fleet Admiral
 
hapoo's Avatar
 
Join Date: Jan 2000
Location: 742 Evergreen Terrace, Springfield USA
Posts: 9,276
well you could always just run it from the command prompt instead of double clicking on it.
__________________
hapoo is offline   Reply With Quote
Old 11-07-2001, 08:19 PM   #7
Jeffbx
Fleet Admiral
 
Jeffbx's Avatar
 
Join Date: Mar 2000
Location: Michigan
Posts: 9,390
Send a message via MSN to Jeffbx
Or send the output to a text file:

@echo off
> c:\textfile.txt
Jeffbx is offline   Reply With Quote
Old 11-08-2001, 01:34 PM   #8
OC
the admiral formerly known as overclocked
 
OC's Avatar
 
Join Date: Aug 2000
Location: Outside the mainstream
Posts: 5,922
Quote:
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
__________________
But what is adulthood except a delayed end-run around our parents' better judgment?
-- Peter Egan

*cough*
OC is offline   Reply With Quote
Old 11-09-2001, 06:25 AM   #9
Jeffbx
Fleet Admiral
 
Jeffbx's Avatar
 
Join Date: Mar 2000
Location: Michigan
Posts: 9,390
Send a message via MSN to Jeffbx
Quote:
Originally posted by overclocked


even better:

@echo off
> c:\textfile.txt
notepad c:\textfile.txt


This'll automatically open the text file in Notepad.

-OC

Hey hey! Getting fancy here!
Jeffbx is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 03:16 AM.