Category : Batch File Utilities - mostly for DOS
Archive   : ABFS.ZIP
Filename : ADVBAT04.TXT

 
Output of file : ADVBAT04.TXT contained in archive : ABFS.ZIP
Ok, so we can use environment variables to restart a batch file at a given
point as we just saw. However, we can also make use of the "magic"
properties of the "%0" parameter, the "name" of the invoking batch file!

Recall that %0 holds the entire command line up to the first blank, but
great mother DOS only reads either 8 characters or up to a "." when it
looks for a file name. Thus if we type:

DEMO_1.andmorejunk parm1

DEMO_1.BAT gets called (DOS only reads up to the "." remember)

but!

%0 == DEMO_1.andmorejunk %1 == parm1

Lets see how this lets us restart at any point desired, without any need
for the environment, nor any change to any %1 %2 %3 parms we use either.

Take a good look at the batch file code for DEMO_1.BAT right now, using
Vern Buerg's LIST (L.COM) program.



  3 Responses to “Category : Batch File Utilities - mostly for DOS
Archive   : ABFS.ZIP
Filename : ADVBAT04.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/