home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / wbt30a.zip / PKUNZIP.WBT < prev    next >
Text File  |  1991-02-17  |  1KB  |  55 lines

  1. ; PKUNZIP Window Setup "Front End"       Extract
  2. Debug(@OFF)
  3. FileSpec="*.ZIP";
  4. OrigDir=DirGet()
  5. Extract="*.*"
  6. DestDir=""
  7. XF=1
  8. XDir=1
  9.  
  10. :Retry
  11.  
  12. DialogBox("PKUNZIP SETUP","%OrigDir%pkunzip.wbd")
  13.  
  14. FileSpec=StrUpper(FileSpec)
  15. if DestDir == '' then  goto Next
  16. DestDir=StrUpper(DestDir)
  17. if (strlen(DestDir)>3 && StrSub(DestDir,strlen(DestDir),1)!='\') then DestDir = strcat(DestDir,"\")
  18.  
  19. :Next
  20. OptLine=''
  21. if XF   == 1 then  OptLine = "-x"
  22. if RF   == 1 then  OptLine = strcat(OptLine,"-r")
  23. if XS   == 1 then  OptLine = strcat(OptLine,"-c")
  24. if Test == 1 then  OptLine = strcat(OptLine,"-t")
  25. if Verb == 1 then  OptLine = strcat(OptLine,"-v")
  26. if XDir == 1 then  OptLine = strcat(OptLine,"-d")
  27.  
  28. if Extract == "*.*" then Extract = ''
  29. OptLine = strcat(OptLine,' ',FileSpec,' ',DestDir,' ',Extract)
  30.  
  31. if FileExtension(FileSpec)=="ZIP" then goto Process
  32. Display(6,"Error","Extension of file is not ZIP")
  33.  
  34. :Process
  35. if Opt == 1 then goto DoitToit
  36. if Opt == 2 then goto RunRun
  37. if Opt == 3 then goto Display
  38.  
  39.  
  40. :DoitToit
  41. b=askyesno("SUBMIT?",strcat('PKUNZIP.EXE ',OptLine))
  42. if b == 0 then goto zexit
  43. ; Else just drop into RunRun code...
  44.  
  45. :RunRun
  46. Run("PKUNZIP.EXE",OptLine)
  47. Goto zexit
  48.  
  49. :Display
  50. Message("PKUNZIP.EXE Command is",strcat('PKUNZIP.EXE ',OptLine))
  51. Goto Retry
  52.  
  53. :ZExit
  54. Exit
  55.