[bit.listserv.novell] Appending to DOS path

BEEBE@YALEMED.BITNET (Rick Beebe) (03/01/90)

>This is the batch program to append to my path:
>
>pathadd.bat
>
>@echo off
>path = %path%;%1
>
>This works fine for a single path addition thus you need to run it for each
>added path.  You can do the command path >> oldpath.bat and then restore
>the original path when you need.
>
>     -Al Marshall, Proteon

A more flexible version:

@echo off
path > reset.bat
:loop
if "%1" == "" goto done
path=%path%;%1
shift
goto loop
:done

This one lets you add as many paths as you want, i.e.

        pathadd c:\utils;c:\net

By typing RESET, you can set your path back to its original state.

-----------------------------------------------------------------------------
                                Rick Beebe                    (203) 785-4566
 *****  *****  *****  *   *     Biomedical Computing Unit
   *      *    *      **  *     Yale University School of Medicine
   *      *    ***    * * *     333 Cedar Street, New Haven, CT 06514
   *      *    *      *  **
   *      *    *      *   *     BEEBE@YALEMED.BITNET
                                beebe%biomed.decnet@venus.ycc.yale.edu
-----------------------------------------------------------------------------

acm@RELAY.PROTEON.COM (03/01/90)

Rick,

Finally someone has pointed out a use for the shift batch command.  That
is one of the commands I have never used!!!

     -Al