SHORTIES\ADDPATH.BAT ·
BAT ·
1.7 KB ·
1989-05-03 ·
from PCPlus_Issue-36_Sep_1989-FluxEngine-360kB
echo off
:** ADDPATH.BAT Ver 1.4 12/APR/1989 (c) M. Greenfield 1989 **
if %1@==@ goto addphelp
if %1@==/P@ goto addpprev
if %1@==/p@ goto addpprev
if %1@==/L@ goto addplast
if %1@==/l@ goto addplast
if %1@==/R@ goto addprst
if %1@==/r@ goto addprst
set addpathp=%path%
path %1;%addpathp%;%2
if %2@==@ path %1;%addpathp%
if %1@==/E@ path %addpathp%;%2
if %1@==/e@ path %addpathp%;%2
set addpathl=%path%
goto addpquit
:addplast
path %addpathl%
goto addpquit
:addpprev
path %addpathp%
goto addpquit
:addprst
set addpathl=
set addpathp=
goto addpquit
:addphelp
cls
echo ADDPATH HELP
echo ~~~~~~~~~~~~
echo This file allows path changes to be made from the keyboard without retyping
echo the whole of the path each time. Previous & Last paths are stored for reuse.
echo USAGE:
echo ADDPATH {addition} ═» New-Path ═ {addition};Old-Path
echo ADDPATH /E {addition} ═» New-Path ═ Old-Path;{addition}
echo ADDPATH {addition-1} {addition-2} ͯ
echo ═» New-Path ═ {addition-1};Old-Path;{addition-2}
echo Note:
echo The "additions" must conform to normal DOS path syntax,
echo excluding the semicolons (;) e.g. C:\WORD\LETTERS
echo.
echo ADDPATH /P ═» New-Path ═ Previous-Path
echo ADDPATH /L ͯ Restores New-Path if it was modified by another program
echo or after an ADDPATH /P command
echo ADDPATH /R ͯ Removes variables ADDPATHP & ADDPATHL from the environment
echo (these are used in the above two commands for restoring or
echo returning to the previous path)
:addpquit
echo Environment:
echo /P =%addpathp%
echo /L =%addpathl%
path