home *** CD-ROM | disk | FTP | other *** search
- ; PKUNZIP Window Setup "Front End" Extract
- Debug(@OFF)
- FileSpec="*.ZIP";
- OrigDir=DirGet()
- Extract="*.*"
- DestDir=""
- XF=1
- XDir=1
-
- :Retry
-
- DialogBox("PKUNZIP SETUP","%OrigDir%pkunzip.wbd")
-
- FileSpec=StrUpper(FileSpec)
- if DestDir == '' then goto Next
- DestDir=StrUpper(DestDir)
- if (strlen(DestDir)>3 && StrSub(DestDir,strlen(DestDir),1)!='\') then DestDir = strcat(DestDir,"\")
-
- :Next
- OptLine=''
- if XF == 1 then OptLine = "-x"
- if RF == 1 then OptLine = strcat(OptLine,"-r")
- if XS == 1 then OptLine = strcat(OptLine,"-c")
- if Test == 1 then OptLine = strcat(OptLine,"-t")
- if Verb == 1 then OptLine = strcat(OptLine,"-v")
- if XDir == 1 then OptLine = strcat(OptLine,"-d")
-
- if Extract == "*.*" then Extract = ''
- OptLine = strcat(OptLine,' ',FileSpec,' ',DestDir,' ',Extract)
-
- if FileExtension(FileSpec)=="ZIP" then goto Process
- Display(6,"Error","Extension of file is not ZIP")
-
- :Process
- if Opt == 1 then goto DoitToit
- if Opt == 2 then goto RunRun
- if Opt == 3 then goto Display
-
-
- :DoitToit
- b=askyesno("SUBMIT?",strcat('PKUNZIP.EXE ',OptLine))
- if b == 0 then goto zexit
- ; Else just drop into RunRun code...
-
- :RunRun
- Run("PKUNZIP.EXE",OptLine)
- Goto zexit
-
- :Display
- Message("PKUNZIP.EXE Command is",strcat('PKUNZIP.EXE ',OptLine))
- Goto Retry
-
- :ZExit
- Exit
-