|
Answer» Hi,
I have a batch file:
call a.bat ... some stuff... command 1 command 2
a.bat looks like: ... set env. vairables... call b.bat ...set env. vairables...
The problem i am facing is, when i run my batch file, a.bat runs and that's all. I have to press enter, then command 1 & 2 start to execute.
Further command 1 & 2 start parallely. 2 doesn't wait for 1 to complete.
ThanksA small update:
When i press
it types ERROR!
and then proceeds ahead.Code: [Select]call a.bat ... some stuff... command 1 command 2
a.bat looks like: ... set env. vairables... call b.bat ...set env. vairables...
PLEASE post the entire contents of the calling file and both the a & b bat FILES. If you are truly getting a message "ERROR!", we'd never know it from what's posted. Should be interesting what "...some stuff..." refers to.
Ooops,
My apologies.
I was just digging from where the !ERROR was coming.
Somewhere in recursive calling of batch files, there was a cmd commnad.
That's why my commands were getting executed after TYPING exit.
Thanks Sideee BTW,
Can this somehow happen that 2 commands get called in parallel. Quote Can this somehow happen that 2 commands get called in parallel I'm not sure how unless the two commands are started, in which case they would run in separate processes (windows).
A call statement CREATES a return mechanism which allows some secondary external code UPON completion to follow an address pointer back to the next sequential instruction after the call
Running external code from a process without a call mechanism would simply transfer control to the external code with no pointer back to the original process.
if we had fewer emoticons and more information, we might get somewhere. The emotions tell the story that information is over
|