home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / WILD401.ZIP / DO.BAT next >
DOS Batch File  |  1993-06-28  |  3KB  |  156 lines

  1. @echo off
  2.  
  3. SET do#=
  4. if "%1"=="" echo Type  DO ?  for HELP
  5. if "%1"=="" goto END
  6. if "%1"=="?" goto HELP
  7. if "%1"=="/w" SET do#=w
  8. if "%1"=="/w" shift
  9.  
  10. if "%2"=="" goto 2
  11. if "%2"=="+" goto 2
  12. if "%3"=="" goto 3
  13. if "%3"=="+" goto 3
  14. if "%4"=="" goto 4
  15. if "%4"=="+" goto 4
  16. if "%5"=="" goto 5
  17. if "%5"=="+" goto 5
  18. if "%6"=="" goto 6
  19. if "%6"=="+" goto 6
  20. if "%7"=="" goto 7
  21. if "%7"=="+" goto 7
  22. if "%8"=="" goto 8
  23. if "%8"=="+" goto 8
  24. if "%9"=="" goto 9
  25. if "%9"=="+" goto 9
  26. goto END
  27.  
  28. :2
  29. CALL %1
  30. if %2.==. goto END
  31. if "%do#%"=="dow" READY
  32. shift
  33. shift
  34. shift
  35. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  36.  
  37. :3
  38. CALL %1 %2
  39. if %3.==. goto END
  40. if "%do#%"=="dow" READY
  41. shift
  42. shift
  43. shift
  44. shift
  45. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  46.  
  47. :4
  48. CALL %1 %2 %3 
  49. if %2.==. goto END
  50. if "%do#%"=="dow" READY
  51. shift
  52. shift
  53. shift
  54. shift
  55. shift
  56. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  57.  
  58. :5
  59. CALL %1 %2 %3 %4
  60. if %2.==. goto END
  61. if "%do#%"=="dow" READY
  62. shift
  63. shift
  64. shift
  65. shift
  66. shift
  67. shift
  68. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  69.  
  70. :6
  71. CALL %1 %2 %3 %4 %5
  72. if %2.==. goto END
  73. if "%do#%"=="dow" READY
  74. shift
  75. shift
  76. shift
  77. shift
  78. shift
  79. shift
  80. shift
  81. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  82.  
  83. :7
  84. CALL %1 %2 %3 %4 %5 %6
  85. if %2.==. goto END
  86. if "%do#%"=="dow" READY
  87. shift
  88. shift
  89. shift
  90. shift
  91. shift
  92. shift
  93. shift
  94. shift
  95. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  96.  
  97. :8
  98. CALL %1 %2 %3 %4 %5 %6 %7
  99. if %2.==. goto END
  100. if "%do#%"=="dow" READY
  101. shift
  102. shift
  103. shift
  104. shift
  105. shift
  106. shift
  107. shift
  108. shift
  109. shift
  110. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  111.  
  112. :9
  113. CALL %1 %2 %3 %4 %5 %6 %7 %8
  114. if %2.==. goto END
  115. if "%do#%"=="dow" READY
  116. shift
  117. shift
  118. shift
  119. shift
  120. shift
  121. shift
  122. shift
  123. shift
  124. shift
  125. shift
  126. DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  127.  
  128.  
  129. :HELP
  130. cls
  131. echo.╔═════════════════════════════════════════════════════════════════════════╗
  132. echo ║ DO.BAT - Haris Courouclis (CADMOS), 1990                                ║
  133. echo ╟─────────────────────────────────────────────────────────────────────────╢
  134. echo ║ FORMAT: DO [/w] command1 [arg1 [arg2 ...] + [command2 ...]]             ║
  135. echo.║                                                                         ║
  136. echo ║   DO is used to execute multiple commands using one command line.       ║
  137. echo ║   The supplied arguments are separated in groups by the plus sign (+).  ║
  138. echo.║                                                                         ║
  139. echo ║   If the first parameter is /w, then READY is executed after each       ║
  140. echo ║   command cycle (Wait).                                                 ║
  141. echo.║                                                                         ║
  142. echo ║ Examples: DO copy c:\do.bat c:\batch\do.bat + del c:\do.bat             ║
  143. echo ║   will execute COPY c:\do.bat c:\batch\do.bat                           ║
  144. echo ║   and then     DEL c:\do.bat                                            ║
  145. echo ║ with Wild: Wild /k:list\013 DO ..\*.arj arj e +wild + COMMAND + del *.* ║
  146. echo ║   will extract files from the parent dir, drop to DOS, use Buerg's LIST ║
  147. echo ║   to list the files, wait for you to type EXIT, wait for confirmation   ║
  148. echo ║   to delete all files in current dir, and proceed with next ARJ.        ║                   ║
  149. echo.║                                                                         ║
  150. echo ║ WARNING: DO.BAT uses (and resets) environmental variable DO#            ║
  151. echo.╚═════════════════════════════════════════════════════════════════════════╝
  152.  
  153. :END
  154. SET do#=
  155. echo.
  156.