home *** CD-ROM | disk | FTP | other *** search
/ Windows Shareware GOLD / NuclearComputingVol3No1.cdr / apps / f1340 / pkunzip.wbt < prev    next >
Text File  |  1991-08-03  |  1KB  |  56 lines

  1. ; PKUNZIP Window Setup "Front End"       Extract
  2. Debug(@OFF)
  3. FileSpec="*.ZIP";
  4. OrigDir=DirGet()
  5. Extract="*.*"
  6. DestDir=""
  7. ;not needed 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. ;not needed if XF   == 1 then  OptLine = "-x"
  22. ; old line if RF   == 1 then  OptLine = strcat(OptLine,"-r")
  23. if RF   == 1 then  OptLine = strcat(OptLine,"-o")
  24. if XS   == 1 then  OptLine = strcat(OptLine,"-c")
  25. if Test == 1 then  OptLine = strcat(OptLine,"-t")
  26. if Verb == 1 then  OptLine = strcat(OptLine,"-v")
  27. if XDir == 1 then  OptLine = strcat(OptLine,"-d")
  28.  
  29. if Extract == "*.*" then Extract = ''
  30. OptLine = strcat(OptLine,' ',FileSpec,' ',DestDir,' ',Extract)
  31.  
  32. if FileExtension(FileSpec)=="ZIP" then goto Process
  33. Display(6,"Error","Extension of file is not ZIP")
  34.  
  35. :Process
  36. if Opt == 1 then goto DoitToit
  37. if Opt == 2 then goto RunRun
  38. if Opt == 3 then goto Display
  39.  
  40.  
  41. :DoitToit
  42. b=askyesno("SUBMIT?",strcat('PKUNZIP.EXE ',OptLine))
  43. if b == 0 then goto zexit
  44. ; Else just drop into RunRun code...
  45.  
  46. :RunRun
  47. Run("PKUNZIP.EXE",OptLine)
  48. Goto zexit
  49.  
  50. :Display
  51. Message("PKUNZIP.EXE Command is",strcat('PKUNZIP.EXE ',OptLine))
  52. Goto Retry
  53.  
  54. :ZExit
  55. Exit
  56.