|
#1
|
|||
|
|||
|
Another Bat Question
Before I do this I need to get a little more information about how bat files work. I have four bat files that I want to run one after another. Can I use the call command in file 1 to start 2,3, and 4?
For example: File 1: @echo off my bat file call bat file 2 call bat file 3 call bat file 4 exit All files run in dos instead of windows so will this work? Exit is the last line in all my bat files but I was wondering if the call function worked similiar to the gosub/return function. After file 2 completes will control return to file 1 and continue with the next line which is to execute file 3 and so on? Or am I just getting batty? Thanks all.-John |
|
#2
|
||||
|
||||
|
why don't just create 1 big batch file?
|
|
#3
|
|||
|
|||
|
I'm experimenting.
|
|
#4
|
||||
|
||||
|
I know but i see no practical person in doing what you are trying to do.
|
|
#5
|
|||
|
|||
|
It allows you to build common batch files that can then be called from other batch files. Ie: The Modular progamming concept.
Dopey: Yes the CALL is the way to do it. BTW You could easily confirm this yourself. There are 2 useful DOS debugging commands: ECHO and PAUSE For example, if you create batch file 1 with Call File2.bat Call File3.bat And then in file 2 Echo File 2 Pause And in File 3 Echo File 3 Pause When you start File 1, you can then see what actually happens. |
|
#6
|
|||
|
|||
|
Thank you WhitPhil. Works great.
-John |
|
#7
|
||||
|
||||
|
Oh i see.
|
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 08:05 PM.
[
RSS ]



Thanks all.




