home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / twinopus / dopus / root.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-02-21  |  1.2 KB  |  55 lines

  1. /*
  2.  *
  3.  * Go to the root directory in TwinExpress from DOpus.
  4.  *
  5.  * (c) 1994 by K.P. van Beem (2:280/464.2, patrick.van.beem@aobh.xs4all.nl)
  6.  *
  7.  * Based on the DOpusLhaARexx package by Geoff Seeley (but you can better
  8.  * use GuiArc in stead of DOpus and a script, to deal with archives)
  9.  *
  10.  *    Mods  By Ray Abram
  11.  *     - If called on a DOpus Dir, then will tell Dopus to do a Root
  12.  *
  13.  */
  14.  
  15. DOpusPort   = 'DOPUS.1'
  16.  
  17. if ~show(l,"rexxsupport.library") then
  18.     call addlib("rexxsupport.library",0,-30,0)
  19. if showlist('Ports', DOpusPort) = 0 then do
  20.    say 'Directory Opus Arexx port not found. Aborting.'
  21.    exit
  22. end
  23.  
  24. address 'DOPUS.1'
  25. options results
  26.  
  27. /* setup DOpus window and tell user what's happening */
  28. Busy on
  29. TopText "Getting directory of CD, please wait..."
  30.  
  31. /* Get the current directory */
  32. 'Status 6 -1'
  33. GetEntry Result
  34. FilePath = Result
  35. if left(FilePath,1) ~= '*' then do
  36.    TopText "You are not in a 'Twin' directory. ??"
  37.    Root
  38.    Busy off
  39.    exit
  40. end
  41. FilePath = SubStr(FilePath,2)
  42. if right(FilePath,1) = ':' then do
  43.    TopText "You are already at the root. !!"
  44.    Busy off
  45.    exit
  46. end
  47. Root=LastPos(':',FilePath)
  48. if Root = 0 then do
  49.    TopText "No root found. ??"
  50.    Busy off
  51.    exit
  52. end
  53. FilePath = Left(FilePath,Root)
  54. address AREXX "Rexx:DOpus/ReadDir.rexx" FilePath
  55.