home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 28
/
amigaformatcd28.iso
/
-readerstuff-
/
richard_burke
/
scripts
/
unlzxer_v1.2
< prev
next >
Wrap
Text File
|
1998-05-02
|
2KB
|
64 lines
Resident >NIL: C:RequestFile PURE
Resident >NIL: C:RequestChoice PURE
Resident >NIL: C:List PURE
Resident >NIL: C:Echo PURE
; $VER: UnLZXer v1.2 (27.1.98) Richard Burke
lab beg ;This starts the section labelled "beg"
c:which unlzx all >ENV:l2zwlzxl2z ;The path of LZX is found and stored
if WARN ;If LZX cannot be found...
Requestchoice "UnLZX Error Message" "Can't find 'UnLZX' tool! *nSee docs for details!" "Quit"
skip end
endif
lab File
Requestfile >ENV:l2zFilel2z TITLE "Choose the file to decrunch" POSITIVE Decrunch PATTERN #?.(lha|lzh||lzx)
if WARN
skip end
endif
echo >env:l2zfl2z $l2zfilel2z ;Get rid of quotation marks, and also create default path for next archive if converting more
list >env:l2zfszl2z env:l2zfl2z LFORMAT=%L ;Get size of path name
if $l2zfszl2z EQ 1 ;Full path not selected
RequestChoice > NIL: "! Error !" "Choose FULL path!*n(i.e. start with DEVICE listing)" "Try again"
skip File BACK
endif
lab Drw
Requestfile >ENV:l2zDrawerl2z TITLE "Choose the drawer to decrunch to" DRAWERSONLY POSITIVE Decrunch
if WARN
skip mrfls
endif
echo >env:l2zdl2z $l2zdrawerl2z ;Get rid of quotation marks, and also create default path for next archive if converting more
list >env:l2zdszl2z env:l2zdl2z LFORMAT=%L ;Get size of path name
if $l2zdszl2z EQ 1 ;Full path not selected
RequestChoice > NIL: "! Error !" "Choose FULL path!*n(i.e. start with DEVICE listing)" "Try again"
skip Drw BACK
endif
lab ex
"$l2zwlzxl2z" x -x -F $l2zFilel2z $l2zDrawerl2z ;This is the command line where the file is de-archived
if $RC NOT EQ 0 ;RC is Return Code - the number returned when a program exits. 0 indicates everything went correctly
RequestChoice "! ERROR !" "An error occured when decompreesing the archive!" "Okay" >NIL:
endif
lab MrFls
RequestChoice >ENV:l2zMrl2z "More files to decrunch?" "Do you want to decrunch more LhA or LZX files?" "Yes" "No"
if $l2zMrl2z EQ 0
skip end
else
skip beg back
endif
lab end
echo "*ec"
echo " *e[1;32m Thank you for using"
echo " *e[1;4;43mUnLZXer*e[0;m"
c:list >nil: ENV:l2z#?l2z TO T:l2ztmp LFORMAT "delete %S%S >NIL:*n"
execute T:l2ztmp >nil:
delete T:l2ztmp >nil:
quit