home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
PROGRAMM
/
BUILDER.ZIP
/
APATH.BLD
next >
Wrap
Text File
|
1992-12-02
|
905b
|
46 lines
string s,t,y
if paramcount <2 goto error
if "%1"<>"-" goto addit
s:=Uppercase "%2"
:deleteit
t:=s
s:=""
for %%p in "%path%" do parsepath
set "path"=s
exit 0
:addit
s:=Uppercase "%1"
t:=s+";"
if "%path%;" contains t goto error2
set "path" = t+"%path%"
exit 0
:error
say
say "APATH Ver 2.0 THE HYPE UTILITIES written in BUILDER"
say "by David Rude and Doug Amaral"
say
say "Correct usage is : APATH <-> <path name>"
say "where <path name> is the path specification to append to your current path."
say "<-> deletes the path specification from the path."
say
say "Current Path = %path%"
exit 1
:error2
say
say s+" is already on the current path."
say
say "Would you like to remove it ? (Y/N)";
GETYN
if DOSErrorLevel==1
s:=Uppercase "%1"
say
say "Removing %1 from the current path"
goto deleteit
end
exit 2
sub parsepath
y:="%%p"
if (t<>y) s:=s+y+";"
end