I'm running MS-DOS 6.21, under DOSSHELL from MS-DOS 5.0.
I use a text editor (TSE 2.5) with a built in macro language that allows me to run batch files as if they were text editor keyboard commands.
I'm working on revising a pair of these batch files that are called from the TSE text editor. I'm not sure why I broke the batch file down into two parts -- I wrote the code a long time ago -- but that's how it stands now, so the text editor runs the two files in sequence, one after the other.
I can't remember if it's possible to pass an errorlevel from batch file #1 to batch file #2. Does MS-DOS "remember" the errorlevel from a batch file, even after the file has stopped running? And would the subsequent batch file then be able to use that errorlevel from the previous batch file that had just stopped running?
I'd like to add a line at the very beginning of file #2 like this:
Code: Select all
if errorlevel 0 goto end
The objective would be that if file #1 returns an errorlevel of 0, then there would be no need to even run file # 2.
Will in Seattle
a.k.a. "Clueless"