home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / dir / browserii / s / extract < prev    next >
AmigaDOS Script File  |  1994-09-22  |  741b  |  45 lines

  1. .key File/A,Pattern/K
  2. .bra «
  3. .ket »
  4. .def Pattern "#?"
  5.  
  6. UnSet FileType
  7. For "«File»" FTV=FileType D=1
  8.  
  9. IF "$FileType" EQ "LHArc"
  10.     Lha -x -m e "«File»"
  11.     Set Error $RC
  12. Else
  13. IF "$FileType" EQ "Tar"
  14.     gnutar -xf "«File»"
  15.     Set Error $RC
  16. Else
  17. IF "$FileType" EQ "Tar.Z"
  18.     echo Unzip...
  19.     gzip -dc "«File»" >tmp_tar_file_$process.tar
  20.     IF $RC EQ 0
  21.         gnutar -xf tmp_tar_file_$process.tar
  22.     EndIF
  23.     Set Error $RC
  24.     delete >NIL: tmp_tar_file_$process.tar
  25. Else
  26. IF "$FileType" EQ "Zoo"
  27.     Zoo x// "«File»"
  28.     Set Error $RC
  29. Else
  30.     Echo "Unknown archive format '$FileType'"
  31.     Echo >SPEAK: "Extract Failed;"
  32.     Ask "Press RETURN..."
  33.     Quit
  34. EndIF
  35. EndIF
  36. EndIF
  37. EndIF
  38.  
  39. IF $Error GT 0
  40.     Echo "Error extracting «File»."
  41.     Echo >SPEAK: "Extract Failed;"
  42.     Ask "Press RETURN..."
  43. EndIF
  44.  
  45.