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

  1. /* deletefiles */
  2.  
  3. OPTIONS failat 5
  4. OPTIONS results
  5.  
  6. frompath = getenv("dufromdir")
  7. frompath = strip(frompath)
  8. frompath = 'filelist/stripstar'(frompath)
  9.  
  10. rowno = 'filelist/findbottom'()
  11.  
  12. hail = "This deletes all files and subdirectories \"
  13. hail = hail||"Delete any names you don't want deleted\"
  14. hail = hail||"Do you wish to continue?"
  15.  
  16. x = request(200,200,hail,,"Yes","No",)
  17. if x = "" then exit
  18.  
  19. TOP
  20. Down
  21.  
  22. do i = 1 to rowno
  23.    
  24.    STATUS L 
  25.    if result = "RESULT" then do
  26.       line = "I got line "||result
  27.       leave i
  28.    end  
  29.    parse var result name id .
  30.    name = strip(name)
  31.    id = strip(id)
  32.       deletestring = "delete "frompath||name" all quiet"
  33.       address command  deletestring
  34.       DLine
  35.    INSERT "-----file deleted-----------*N"
  36.     
  37.  
  38. end
  39.  
  40. "filelist/getlist "frompath" from " 
  41.  
  42. MSG  frompath
  43. exit      
  44.  
  45.