Subj : BAT Files
To : Jon Watson
From : mark lewis
Date : Thu Sep 02 2004 01:01 am
JW> I think that's the point...he's asking about how to do
JW> this in a BAT file so I assume he's not going to be
JW> there to open new windows as he needs them.
nah... seems to be just a desire to automate the opening of things when he
triggers the first one...
JW> I always thought that the 'call' command in batch files
JW> was the way to go. I'm not sure, but I thought that if
JW> you just named a program or bat file from within a bat
JW> file, then the calling bat file would terminate and the
JW> system wouldn't return to it after running whatever
JW> program was called. I thought that the "call
JW> progam_name" would cause the system to execute that
JW> program, then return to the calling bat file and
JW> execute the remainder of the commands.
that's close... real close...
you "call a.bat" if you want to return from a.bat to current.bat... that's the
only time you call in a .bat... if you don't call a.bat, it won't return from
a.bat to current.bat
test it out!
=== snip a.bat ===
@echo off
echo this is a.bat
=== snip ===
=== snip current.bat ===
@echo off
echo this is current.bat
call a.bat
echo back from a.bat
echo.
echo this is current.bat
a.bat
echo back from a.bat
=== snip ===
you'll notice there is only one call to a.bat... the second one is a direct
executeion... the output should be as follows...