Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close a batch within another batch file ?

Status
Not open for further replies.

myroot

IS-IT--Management
Jul 3, 2003
15
0
0
ES
Hi folks,


i am writing batch 2 scripts (each with .cmd extension)
1 for starting some spec. services (db2, websphere etc) and 1 for stopping the same ones. but within each script i would like start (with call x.bat)another script
(these are seperate short batch files programs, in fact there are 2) In the first program i want to start these 2 and in my seconde batch file, stop these short batch files:

example:

startserv.cmd (starting some db2 and websphere services)
--->> here i use call for starting the other 2 small batch files (with .bat extension)

stopserv.cmd --->> here i use what ???? to stop these other
2 small batch files (with .bat ext)

how can i do this ? starting and stopping these 2 small batch scripts within in my main scrips??

pls help



please
 
I am not sure if I understand proprly what you are sazying. What I know the rule is: when you use "call", the parent will still be "alive", and after executing the call it will return to the line after the call.
if you want the parent to be closed, do not use "call" for the last line from your parent batch file. In this way, the control will be passed to the new called batch file, and the parent will be closed.


Gia Betiu
gia@almondeyes.net
Computer Eng. CNE 4, CNE 5, MCSE Win2K
new: (just started)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top