home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / CDSG.ZIP / CDG.CMD next >
OS/2 REXX Batch file  |  1993-09-20  |  557b  |  24 lines

  1. /* REXX */
  2. /* Adapted from CDG.PAS */
  3.  
  4. say "Change Directory Set/Go - by GLen"
  5.  
  6. CDSGdir = value('CDSG',,'os2environment')
  7. if CDSGdir = "" then call Error 'Environment string CDSG is not set.'
  8.  
  9. arg key
  10. if key = "" then call Error 'No key given.'
  11.  
  12. path = linein(CDSGdir'\'key)
  13. if path = "" then call Error 'Given key "'key'" not previously set, or error in CDSG.'
  14.  
  15. if path \= directory(path) then call Error 'Path "'path'" not available now.'
  16. exit
  17.  
  18.  
  19. Error:
  20. parse arg message
  21. say "Error:" message
  22. say "Type CDS for instructions."
  23. exit 1
  24.