home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d07xx / d0770.lha / Uedit / ucd.rexx < prev    next >
OS/2 REXX Batch file  |  1992-11-22  |  682b  |  29 lines

  1. /* change Uedit's current directory */
  2. /* Ben Eng was here but flew away on a Jet Penguin */
  3. parse arg x y
  4. CR = '0a'x
  5. if x = '?' then call warn
  6. if x = '*' then do
  7.     y = x
  8.     x = ""
  9.     end
  10. if x = "" | x = '""' then cdir = pragma('d')
  11. else cdir = x
  12. address 'URexx' 'd:' || cdir
  13. if cdir = '' | right(cdir,1) = '/' | right(cdir,1) = ':' then
  14.     rootdir = cdir
  15. else rootdir = cdir || '/'
  16. if y = "" then do
  17.     address 'URexx' 'c:43+0' /* tiny-window */
  18.     exit
  19.     end
  20. if y = "*" then address 'URexx' 'c:912+0' /* file request */
  21. else do i=1 to words(y)
  22.     fnam = rootdir || word(y, i)
  23.     address 'URexx' 'f:' || fnam /* load file */
  24.     end
  25. exit
  26. warn:
  27.       say "    USAGE: [rx] ucd [dir] [*|files ...]"
  28.   exit
  29.