Computing.Net > Forums > Disk Operating System > Passing a pause w/ start command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Passing a pause w/ start command

Reply to Message Icon

Name: Robin Siebler
Date: September 26, 2003 at 11:29:16 Pacific
OS: Win2k
CPU/Ram: NA
Comment:

I have the below batch file, which runs a bunch of batch files one at a time in a separate window. However, by default, the window remains open at the end and I have to close it. I tried using start /c, but that closes the window as soon as the batch file finishes, which does not let me see the contents of the window. I would like to insert a pause after the batch file runs. I tried 'start /c %%i & pause', but that didn't work. I tried enclosing it in parenthesis and that didn't work either. Can anyone tell me the *right* way to do this?

for %%i in (t*.bat) do (
start cmd %%i
pause
)



Sponsored Link
Ads by Google

Response Number 1
Name: JackG
Date: September 26, 2003 at 14:43:57 Pacific
Reply:

Try a two step approach. For each t*.bat, Start a CMD that just runs X.BAT %%i where X.BAT has a CALL %1 %2 %3 followed by a Pause and if necessary an EXIT.

This way, each window is running a batch file sequence with a Pause statement at the end and an exit to close the window.

You can then change the function of X.bat by editing it when necessary.


0

Response Number 2
Name: robinsiebler
Date: September 29, 2003 at 11:18:08 Pacific
Reply:

Is there anyway to do this in 1 batch file?


0

Response Number 3
Name: Robin Siebler
Date: September 29, 2003 at 15:00:59 Pacific
Reply:

I couldn't figure out how to do it in 1 file, so I wrote the batch file to create a temp batch file containing the call, pause and exit statements and then delete the temp file at the end.


0

Response Number 4
Name: Miskva
Date: October 3, 2003 at 02:30:32 Pacific
Reply:

Maybe you need to have the "pause" command at the end of each of the batfiles you are running .. and not in the main loop ..;

Miskva


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Passing a pause w/ start command

Batch file>pause, then start prog. www.computing.net/answers/dos/batch-filepause-then-start-prog/14663.html

change a DSN with DOS commands www.computing.net/answers/dos/change-a-dsn-with-dos-commands/14084.html

Particularity of start command www.computing.net/answers/dos/particularity-of-start-command/8791.html