home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
pushpop.zip
/
POP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-10-13
|
410b
|
22 lines
/* command to pop the last directory from the stack */
address CMD '@ECHO OFF'
parse upper arg stk
place = LASTPOS(';',stk)
if place=0 then exit
out = LEFT(stk, place-1)
place = LASTPOS(';',out)
if place=0 then
do
in = out
out = ""
end
else
do
in = SUBSTR(out,place+1)
out = LEFT(stk, place)
end
new = DIRECTORY(in)
address CMD 'SET DIRSTK='out
address CMD 'CD'
exit