Jump to content

Pass Control From Batch file to Batch File


phillyman2004

Recommended Posts

OK i am trying to pass control from one batch file to another, problem i am running into is that the first batch file seems to want to retain control after the second is run

This presents a small problem for me , I have modular batch files , One for a Menu , That passes off control to 5 other batch files , depending on the selection

The First batch file is run from my flash drive , and then when a selection is made , the corresponding batch file is copied to the C drive and run from there so i may remove my flash drive and move on to the next machine , but when i remove my flash drive the first batch file crashes and takes out the second with it

Any ideas

Rob

Link to comment
Share on other sites


Hello,

if you call the second batch file by simply using its name (WITHOUT the command CALL) then the control will not return to the first batch file when the second one terminated.

If you use CALL then the control will return to the first batch file when the second terminates.

Link to comment
Share on other sites

Hello,

if you call the second batch file by simply using its name (WITHOUT the command CALL) then the control will not return to the first batch file when the second one terminated.

If you use CALL then the control will return to the first batch file when the second terminates.

I think i was using the Start command , I will try what you said

Rob

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...