Category : Files from Magazines
Archive   : V12N16.ZIP
Filename : PE.BAT
:PE.BAT - Path Editor. Add or remove directories
IF '%2'=='' GOTO Help
IF '%1'=='+' GOTO AddEnd
IF '%1'=='&' GOTO AddBegin
IF '%1'=='-' GOTO Drop
IF '%1'=='¬' GOTO DoDrop
GOTO Help
:===== AddEnd ========
PATH=%PATH%;%2
ECHO %2 added at end of path.
GOTO End
:===== AddBegin ======
PATH=%2;%PATH%
ECHO %2 added at beginning of path.
GOTO End
:===== Drop ==========
SET ¬=%PATH%
PATH=%2
SET PE_drop=%path%
:: Now variable drop contains %2 capitalized
PATH=%¬%
SET ¬=
SET PE_rem=
:: Restart, passing PATH as parameters
%0 ¬ %PATH%
:===== DoDrop ========
SET PATH=
:== DropLoop
SHIFT
IF '%1'=='' GOTO DoneDrop
IF '%1'=='%PE_drop%' GOTO DidRemove
IF '%PATH%'=='' PATH=%1
IF '%PATH%'=='%1' GOTO DropLoop
PATH=%PATH%;%1
GOTO DropLoop
:== DidRemove
SET PE_rem=YES
GOTO DropLoop
:===== DoneDrop ======
IF '%PE_rem%'=='' ECHO %PE_drop% not found
IF '%PE_rem%'=='YES' ECHO %PE_drop% removed from path
SET PE_drop=
SET PE_rem=
GOTO End
:===== Help ==========
ECHO The options are:
ECHO %0 + directory : adds directory at end of path
ECHO %0 & directory : adds directory at start of path
ECHO %0 - directory : drops directory from path
ECHO Note that the PATH must not be empty.
:===== End ===========
PATH
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/