home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
cdd.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-07-06
|
817b
|
39 lines
/* CDD.CMD -- Emulates the 4DOS/4OS2 command to change drive and
directory
D.F. Yriart -- 7 Aug 1996 */
rcode = 0 /* "Good" return code */
nullString = ''
PARSE ARG newDir
currentDir = Directory()
if newDir = '/?' then SIGNAL usage
if newDir = nullString then
SAY currentDir
else
DO
/* SAY 'Changing to' newDir 'from' currentDir */
success = Directory(newDir)
if success = nullString then
DO
SAY newDir 'does not exist'
rcode = 1 /* set rc = 1 because command failed */
END
END
EXIT rcode
usage:
SAY "Use the CDD command to change the current drive and directory."
SAY "Syntax:"
SAY " CDD [drive:][path]"
SAY
SAY "CDD works like the CD command, except that it will also change"
SAY "drives."
EXIT 3