home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / CDTools / S / Extract.awebrx < prev    next >
Text File  |  1999-09-02  |  1KB  |  44 lines

  1. /* */
  2.  
  3. address command
  4. options results
  5. call addlib('rexxsupport.library',0,-30,0)
  6. call addlib('rexxdossupport.library',0,-30,0)
  7. options failat 21
  8. ExtractPath = 'RAM:'
  9. ExtractPath = AddPart(ExtractPath,'')
  10. CDName = pragma('D')
  11. parse var CDName CDName ':' .
  12. if left(CDName,4) ~= 'AACD' then CDName = 'AACD'
  13.  
  14. parse arg Archive
  15. Ext = upper(substr(Archive,lastpos('.',Archive) + 1))
  16.  
  17. select
  18.     when pos(Ext,'LHA LZH') > 0 then do
  19.         'LhA x "'Archive'" "'ExtractPath'"'
  20.         if RC > 0 then 'RequestChoice >NIL: "Amigactive CD" "An error occured*Nwith this archive" "OK"'
  21.         else 'rx 'CDName':CDTools/S/ShowDir' ExtractPath
  22.         end
  23.     when pos(Ext,'DOC TXT README GUIDE') then 'AACDFile "'Archive'"'
  24.     when Ext = 'TGZ' then do
  25.         'UnTGZ x "'Archive'" "'ExtractPath'"'
  26.         if RC > 0 then 'RequestChoice >NIL: "Amigactive CD" "An error occured*Nwith this archive" "OK"'
  27.         else 'rx 'CDName':CDTools/S/ShowDir' ExtractPath
  28.         end
  29.     when Ext = 'ZIP' then do
  30.         'UnZIP x "'Archive'" "'ExtractPath'"'
  31.         if RC > 0 then 'RequestChoice >NIL: "Amigactive CD" "An error occured*Nwith this archive" "OK"'
  32.         else 'rx 'CDName':CDTools/S/ShowDir' ExtractPath
  33.         end
  34.     /* when Ext = 'DMS' then */
  35.     when pos(Ext,'MPG ANIM GIF JPEG JPG PNG') > 0 then 'AACDFile "'Archive'"'
  36.     otherwise do
  37.         'copy "'Archive'" "'ExtractPath'" clone quiet'
  38.         if RC > 0 then 'RequestChoice >NIL: "Amigactive CD" "An error occured*Nwith this archive" "OK"'
  39.         else 'rx 'CDName':CDTools/S/ShowDir' ExtractPath
  40.         end
  41.     end
  42.  
  43.  
  44.