home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
4dpath.exe
/
DELPATH.BTM
< prev
next >
Wrap
Text File
|
1992-10-05
|
703b
|
27 lines
@echo off^goto start
:help
echo.
echo %@upper[%0] -- Removes given path from the PATH variable.
echo.
echo Usage: %@upper[%0] `<`path`>`
echo.
echo See also ADDPATH.
return
:start
if "%debug" eq "%0" echo on
if "%1" eq "" .or. "%1" eq "/?" (gosub help^quit 0)
iff %@index[%path;,%@full[%1];] ne -1 then
set delpath_b=%@index[%path;,%@full[%1];]
set delpath_e=%@eval[%delpath_b+%@len[%@full[%1];]]
if %delpath_e ge %@len[%path] set delpath_b=%@eval[%delpath_b-1]
set path=%@substr[%path,0,%delpath_b]%@substr[%path,%delpath_e]
unset delpath_b delpath_b >&> nul
quit 0
else
if %_batch eq 1 echo %@upper[%0]: Directory %@full[%1] not in `%`PATH.
quit 1
endiff