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

  1. /* copyall */
  2. OPTIONS results
  3.  
  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. hail = "This copies all files and subdirectories \"
  13. hail = hail||"Delete any names you don't want duplicated\"
  14. hail = hail||"Do you wish to continue?"
  15.  
  16. x = request(200,200,hail,,"Yes","No",)
  17. if x = "" then exit
  18.  
  19. Jump 2 0
  20.  
  21. do i = 1 to rowno
  22.    
  23.    STATUS L 
  24.    if result = "RESULT" then leave i  
  25.    parse var result name id .
  26.    name = strip(name)
  27.    id = strip(id)
  28.    if id = "Dir" then do 
  29.         checkname = topath||name
  30.         if ~exists(checkname) then address command makedir checkname 
  31.         copystring = "copy "frompath||name" to "checkname" all"
  32.    end
  33.    else do
  34.       copystring = "copy "frompath||name" to "topath" all quiet"
  35.    end
  36.       address command  copystring
  37.    Down
  38.     
  39.  
  40. end
  41.  
  42. TOPort = getenv("DUTOPort")
  43. TOPort = '"'TOPort'"'
  44.  
  45. refreshstring = "filelist/getlist "||topath||' to'
  46. refreshstring = '"'refreshstring'"'
  47. interpret address TOPort refreshstring
  48.  
  49. MSG frompath
  50. exit      
  51.  
  52.