home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / cmdpk164.zip / popd.cmd < prev    next >
OS/2 REXX Batch file  |  1997-11-28  |  362b  |  18 lines

  1. /* popd.cmd */
  2.  
  3. envvar = 'DIRSTACK.'translate(DosGetInfoBlocks(), '.', ' ')
  4. qname = value(envvar,,'OS2ENVIRONMENT')
  5. if qname = '' then do
  6.    say 'Directory stack empty!'
  7.    exit 1
  8.    end
  9.    
  10. oldq = RxQueue('Set', qname)
  11. if queued() = 0 then
  12.    say 'Directory stack empty!'
  13. else do
  14.    pull dir
  15.    call directory dir
  16. end
  17. call RxQueue 'Set', oldq
  18.