.key file/A,dest/A
.bra (
.ket )

failat 21

IF NOT EXISTS "(file)"
  requestchoice >nil: "Whoops..." "Can't find file:*n(file)" "Never mind"
  quit
ENDIF


set ext `list "(file)" LFORMAT "%e"`

IF "$ext" EQ "lha"
LAB lha
lzx -m x "(file)" "(dest)" >nil:
skip qit
ENDIF

IF "$ext" EQ "lzx"
LAB lzx
lzx -m x "(file)" "(dest)" >nil:
skip qit
ENDIF

IF "$ext" EQ "zip"
LAB zip
unzip -o "(file)" -d "(dest)" >nil:
skip qit
ENDIF

IF "$ext" EQ "LHA"
skip back lha
ENDIF
IF "$ext" EQ "LZX"
skip back lzx
ENDIF
IF "$ext" EQ "ZIP"
skip back zip
ENDIF

LAB qit
unset ext
