home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / UTIL_ARC / BAT4PKZ.ZIP / ZIPUNDO.BAT < prev   
DOS Batch File  |  1994-02-14  |  3KB  |  101 lines

  1. @echo off
  2. cls
  3. rem zipundo.bat
  4. if "%1" == "" goto help
  5. if not exist %1 goto nopath
  6. if "%2" == "" goto message
  7. if "%2" == "a:\" goto begin
  8. if "%2" == "b:\" goto begin
  9. if "%2" == "c:\" goto begin
  10. if "%2" == "d:\" goto begin
  11. if "%2" == "e:\" goto begin
  12. if "%2" == "f:\" goto begin
  13. if "%2" == "g:\" goto begin
  14. if "%2" == "h:\" goto begin
  15. if "%2" == "i:\" goto begin
  16. if "%2" == "j:\" goto begin
  17. if "%2" == "A:\" goto begin
  18. if "%2" == "B:\" goto begin
  19. if "%2" == "C:\" goto begin
  20. if "%2" == "D:\" goto begin
  21. if "%2" == "E:\" goto begin
  22. if "%2" == "F:\" goto begin
  23. if "%2" == "G:\" goto begin
  24. if "%2" == "H:\" goto begin
  25. if "%2" == "I:\" goto begin
  26. if "%2" == "J:\" goto begin
  27. if not exist %2\nul goto newpath
  28. if exist %2 goto begin
  29. :begin
  30. echo   The file %1 will be unpacked to %2
  31. echo.
  32. echo.
  33. echo.
  34. choice /c:cq /n Press C for Continue or Q to Quit?
  35. if errorlevel 2 goto exit
  36. if errorlevel 1 goto doit
  37. :doit
  38. cls
  39. c:\pkzip\pkunzip -d -$ %1 %2
  40. goto end
  41. :newpath 
  42. echo.
  43. echo.  
  44. echo The destination directory you specified doesn't exist, if you 
  45. echo would like to create it press C, else press Q to Quit.
  46. choice /c:cq 
  47. if errorlevel 2 goto exit
  48. if errorlevel 1 goto make
  49. :make
  50. cls
  51. md %2
  52. c:\pkzip\pkunzip -d -$ %1 %2
  53. goto end
  54. :message
  55. echo.
  56. echo.
  57. echo    The %1 file will be extracted to the current directory
  58. echo    if this is not what you would like to do, then press
  59. echo. 
  60. echo    Q to quit, else press G to go on....
  61. echo.
  62. choice /c:qg
  63. if errorlevel 2 goto goon
  64. if errorlevel 1 goto exit
  65. :goon
  66. cls
  67. c:\pkzip\pkunzip -d -$ %1 
  68. goto end
  69. :nopath
  70. echo.
  71. echo.
  72. echo.
  73. echo              The source path or filename you specified does not exist...
  74. echo              check and try again !
  75. goto exit
  76. :help
  77. echo.
  78. echo.
  79. echo    Usage:   zipundo.bat (path&zip file name) (path for unpacking)
  80. echo.
  81. echo    Example:   zipundo c:\try\tag.zip d:\new
  82. echo.
  83. echo.
  84. echo    This would take the "tag.zip" file of the specified directory
  85. echo    and extract it to d:\new. If destination directory doesn't 
  86. echo    exist, it will be created.
  87. goto exit
  88. :end
  89. cls
  90. echo.
  91. echo.
  92. echo.
  93. echo                  ╔═══════════════════════════╗
  94. echo                  ║ DDDD    OOO   N   N  EEEE ║
  95. echo                  ║ D   D  O   O  NN  N  E    ║  
  96. echo                  ║ D   D  O   O  N N N  EEE  ║
  97. echo                  ║ D   D  O   O  N  NN  E    ║
  98. echo                  ║ DDDD    OOO   N   N  EEEE ║
  99. echo                  ╚═══════════════════════════╝
  100. :exit
  101.