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

  1. /* copyfiles */
  2. OPTIONS results
  3. OPTIONS failat 5
  4. frompath = getenv("dufromdir")
  5. frompath = 'filelist/stripstar'(frompath)
  6.  
  7. topath = getenv("dutodir")
  8. topath = 'filelist/stripstar'(topath)
  9.  
  10. rowno = 'filelist/findbottom'()
  11.  
  12. Jump 2 0
  13.  
  14. do i = 1 to rowno
  15.    
  16.    STATUS L 
  17.    if result = "RESULT" then do 
  18.       line = "I got the line "||result
  19.       x = postmsg(200,200,line,)
  20.       leave i 
  21.    end 
  22.    parse var result name id .
  23.    name = strip(name)
  24.    id = strip(id)
  25.    
  26.    if id = "Dir" then do
  27.       Down
  28.       iterate
  29.    end
  30.    else do
  31.       copystring = "copy "frompath||name" to "topath " quiet"
  32.       address command  copystring
  33.    end
  34.    Down
  35.     
  36.  
  37. end
  38.  
  39. TOPort = getenv("DUTOPort")
  40. TOPort = '"'TOPort'"'
  41.  
  42. refreshstring = "filelist/getlist "||topath||' to'
  43. refreshstring = '"'refreshstring'"'
  44. interpret address TOPort refreshstring
  45.  
  46. MSG frompath
  47. exit      
  48.  
  49.