How to create batch file which call other batch file and execute commands
Hi,
i am using windows2003 server edition.
How can I create a batch file which can open another batch file and execute all command which is written in same batch file.
I am calling a batch file through VB and that batch file calls other batch file where I want to execute some commands.
Example:
batch file test.bat contains
db2cw
db2 connect to sample
Here the first line of test.bat calling other batch file db2cw which itself a command window for db2.
Now here (in db2cw) I want to execute command db2 connect to sample which is written in test.bat file
Please find the attachment for db2cw window, cmd window snapshot and test.bat file.
Note: db2 connect to sample is specific command for db2cw it will not execute on cmd
Thanks in Advance......................
Thanks & Regards
Ritesh Kumar
[901 byte] By [
singhipst] at [2007-11-20 0:59:04]

# 1 Re: How to create batch file which call other batch file and execute commands
This is a duplicate post. A moderator will remove it.
Please refer to your other post ( http://www.dev-archive.com/forum/showthread.php?t=398843).
# 2 Re: How to create batch file which call other batch file and execute commands
Hi,
i am using windows2003 server edition.
How can I create a batch file which can open another batch file and execute all command which is written in same batch file.
I am calling a batch file through VB and that batch file calls other batch file where I want to execute some commands.
Example:
batch file test.bat contains
db2cw
db2 connect to sample
Here the first line of test.bat calling other batch file db2cw which itself a command window for db2.
Now here (in db2cw) I want to execute command db2 connect to sample which is written in test.bat file
Please find the attachment for db2cw window, cmd window snapshot and test.bat file.
Note: db2 connect to sample is specific command for db2cw it will not execute on cmd
Thanks in Advance......................
Thanks & Regards
Ritesh Kumar
Please do not cross post in multiple boards.
Ejaz at 2007-11-10 3:41:08 >

# 5 Re: How to create batch file which call other batch file and execute commands
Can you explain a little more clearly?
Why are you having a batch file call a batch file? Why not just call one batch file that can process what you need?