home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
r
/
retain11.zip
/
RETAINCD.BAT
< prev
Wrap
DOS Batch File
|
1992-12-10
|
1KB
|
37 lines
echo off
rem ===RETAINCD.BAT, vs. 1.1, 10/12-92===
echo --- RETAINCD 1.1 (c) 1992, Jim Groeneveld; RETAIN & CD combo.
rem (1) retains the current drive:subdir and
rem (2) changes drive and subdir to the first parameter
if "%1"=="" goto help
if "%1"=="?" goto help
if "%1"=="/?" goto help
if "%1"=="-?" goto help
:CDD
call retain %2
rem command/c retain ;for DOS«3.3
rem Check for existence of [drive:][path] could be included here, but isn't.
rem To suppress DOS error messages if the parameter contains no drive, but
rem only a subdirectory specification: CTTY NUL .
ctty nul
%1\
rem No check for existence of drive.
ctty con
cd %1
rem Invalid directories are reported by DOS and do not need to be analyzed here
goto end
:help
echo.
echo Syntax: 'RETAINCD drive┼path [aux-path[aux-file]│*│[/│-]?]', in which:
echo drive = drive specification to CD to, e.g. 'C:';
echo path = absolute (\[...[\...]]) or
echo relative (...[\...]) path specification to CD to.
echo At least one of these (either drive or path) or both _must_ be specified.
echo aux-path = drive:\subdir\ of auxiliary file $RETURN$.AUX, incl. trailing '\';
echo aux-file = the eventual alternate auxiliary file name for $RETURN$.AUX;
echo * = list the currently stored paths (also with 'RETURN *');
echo ? (or /? or -?) = display this help.
:end