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

  1. @echo off
  2. cls
  3. rem zippy.bat
  4. if "%1" == "A" goto azip
  5. if "%1" == "a" goto azip
  6. if "%1" == "B" goto bzip
  7. if "%1" == "b" goto bzip
  8. if "%1" == "" goto help
  9. if "%2" == "" goto message
  10. if "%3" == "" goto message
  11. cd %1:\%2
  12. if not exist %1:\%2\nul goto error
  13. if exist %1:\%2
  14. %1:
  15. cd %1:\%2
  16. echo.
  17. echo.
  18. echo. 
  19. echo The directory %1:\%2 is found.
  20. echo.
  21. echo.
  22. echo. 
  23. choice /c:cq /n Press C for Continue or Q to Quit?
  24. if errorlevel 2 goto exit
  25. if errorlevel 1 goto doit
  26. :doit
  27. cls
  28. c:\pkzip\pkzip -ex -rp c:\zipit\%3
  29. goto end
  30. :error
  31. cls
  32. echo.
  33. echo.
  34. echo.
  35. echo         The directory you specified does not exist...
  36. echo         Check the directory name and try again...
  37. goto exit
  38. :azip
  39. a:
  40. echo.
  41. echo The floppy drive A is found...
  42. echo.
  43. echo.
  44. choice /c:cq /n Press C for Continue or Q to Quit?
  45. if errorlevel 2 goto exit
  46. if errorlevel 1 goto doa
  47. :doa
  48. cls
  49. c:
  50. c:\pkzip\pkzip -ex -rp -$a %2 a:\*.*       
  51. goto end
  52. :bzip
  53. b:
  54. echo.
  55. echo The floppy drive B is found...
  56. echo.
  57. echo.
  58. choice /c:cq /n Press C for Continue or Q to Quit?
  59. if errorlevel 2 goto exit
  60. if errorlevel 1 goto dob
  61. :dob
  62. cls
  63. c:
  64. c:\pkzip\pkzip -ex -rp -$b %2 b:\*.* 
  65. goto end
  66. :message
  67. echo. 
  68. echo    You must specify a directory name after the drive letter,
  69. echo    and a zip file name after the directory name...
  70. goto exit
  71. :help
  72. echo.
  73. echo.
  74. echo     Usage:  zippy.bat (drive) (directory) (zip file name)
  75. echo.
  76. echo     Example:  zippy c windows win
  77. echo.
  78. echo     This would zip up the Windows directory in C-drive with all it's
  79. echo     Subdirectories and create the win.zip file... 
  80. echo.
  81. echo     Notice not to use any colons or backlashes!
  82. echo.
  83. echo.
  84. echo     Usage: To zip up the A or B Floppy drive
  85. echo.
  86. echo             zippy.bat (drive) (zip file name)
  87. echo.
  88. echo     Example:  zippy a try
  89. echo.
  90. echo     This would zip up the A-Floppy with all it's Subdirectories,
  91. echo     store the volume label of the disk and create the try.zip file. 
  92. goto exit
  93. :end
  94. cls
  95. echo.
  96. echo.
  97. echo.
  98. echo                  ╔═══════════════════════════╗
  99. echo                  ║ DDDD    OOO   N   N  EEEE ║
  100. echo                  ║ D   D  O   O  NN  N  E    ║  
  101. echo                  ║ D   D  O   O  N N N  EEE  ║
  102. echo                  ║ D   D  O   O  N  NN  E    ║
  103. echo                  ║ DDDD    OOO   N   N  EEEE ║
  104. echo                  ╚═══════════════════════════╝
  105. :exit
  106.