home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 216.lha / RexxArpLib_v2.1 / rexx / filelist / parent.txed < prev    next >
Encoding:
Text File  |  1996-02-15  |  1.0 KB  |  41 lines

  1. /* parent.txed */
  2. arg duwindow
  3.  
  4. OPTIONS results
  5.  
  6.   if duwindow = "FROM" then devstring = getenv("dufromdir")
  7.   else devstring = getenv("dutodir")
  8.  
  9.   colonloc = index(devstring ,":")
  10.  
  11.   if colonloc ~= 0 then parse var devstring dev ":" devstring
  12.  
  13.   if devstring = "" then devstring = ":"
  14.   else do
  15.      devstring = reverse(devstring)
  16.      lastslash = index(devstring,"/")
  17.      if lastslash = 1 then parse var devstring  a "/" devstring
  18.      parse var devstring prev "/" devstring
  19.      devstring = reverse(devstring)
  20.      if devstring ~= "" then devstring = dev":"||devstring||"/"
  21.      else devstring = dev":"
  22.   end 
  23.  
  24.   if duwindow = "FROM" then do
  25.      address command "list >VD0:DUFROMTEMPLISTING sort nodates " devstring
  26.      LOAD "VD0:DUFROMTEMPLISTING"
  27.      'filelist/cleanlast'
  28.      x = setenv("dufromdir", devstring)  
  29.   end
  30.   else do
  31.      address command "list >VD0:DUTOTEMPLISTING sort nodates " devstring
  32.      LOAD "VD0:DUTOTEMPLISTING"
  33.      'filelist/cleanlast'
  34.      x = setenv("dutodir", devstring)
  35.   end
  36.  
  37.  
  38.   MSG devstring
  39.  
  40. exit
  41.