Batch file start command issue

I have a batch file that I'm trying to write that does multiple commands waiting for completion between them. I've found a way to do that using start /wait, but then the command prompt that start launches won't close until I type exit in it.

Here's the commands I need run:
cd bea92\weblogic92\config\WebCTDomain\
start /wait backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_1.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
start /wait backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_2.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
start /wait backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_3.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
start /wait backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_4.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
start /wait backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_5.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd

I tried adding a @ exit at the end of each line to try and get it to do that after the command had completed (as seen in the screenshot), but it doesn't seem to do anything. What you're seeing in the screenshot is the batch file running on top, and the start command running on the bottom. It just sits like that until I type exit into the start command window at which point the batch file moves to the next command. I tried running the start command with /B and it just did the exact same thing with only 1 window instead of two, and like I said I tried adding a @ exit as well that didn't work.

Any help would be greatly appreciated. Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

have you tried START /B /WAIT (with the '/B' option)?
Dancindan84Author Commented:
Yeap, I made note of that at the end of my comment (sorry, it was a bit of a novel). Does the same thing, but just in the single main window instead of in sub-windows. Just sits there after the command is complete until I type in exit then moves to the next command.
Dancindan84Author Commented:
Here's a screenshot of that in action. It won't progress to the second command until I put in exit like you see here.
Screenshot replaced with scrubbed image by LadyModiva 042910 per

Open in new window

JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Dancindan84Author Commented:
Ok, this is strange. I made a batch file with one of the commands in it and an exit (restore_1.cmd):

cd bea92\weblogic92\config\WebCTDomain\
backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_1.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd

If I run that batch file it works exactly as expected (does the command and then exits). However, if I run that batch file by calling it from another batch file using the start command:

cd 200909
start /wait restore_1.cmd

It hangs after completing and doesn't exit. Something about the start command is not working as expected.
Dancindan84Author Commented:
Something strange was happening with the start /wait as if I changed the second file above to:

cd 200909
call restore_1.cmd

it worked properly. As far as I'm aware, call is supposed to work the same as start /wait. I'm going to go back to my original file and see if using call instead of start /wait works as I want.
Dancindan84Author Commented:
Yeah, using call instead of start /wait worked:

cd bea92\weblogic92\config\WebCTDomain\
call backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_1.xml --logfile=f:\200909\restore.log --username=admin --password=****** --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
call backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_2.xml --logfile=f:\200909\restore.log --username=admin --password=******  --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
call backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_3.xml --logfile=f:\200909\restore.log --username=admin --password=******  --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
call backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_4.xml --logfile=f:\200909\restore.log --username=admin --password=******  --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd
call backupRestoreCLI --action=restore --backupdir=f:\200909\ --configfile=F:\200909\restore_request_200909_5.xml --logfile=f:\200909\restore.log --username=admin --password=******  --glcid=URN:X-WEBCT-VISTA-V1:e4e1f328-c08b-ed0a-00ca-b7830a4dbddd

Runs each command in sequence automatically. No idea why start /wait didn't work the same, but I did come across some info indicating that using @echo off at the beginning may have let it run as I expected (Ref:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.