tags:

views:

31

answers:

1

i use following code to call a batch file:
dim shell
set shell=createobject("wscript.shell")
shell.run "a.bat D:\a"
set shell=nothing
how do i call more than 1 batch files, so that when 1st file's execution is over, the 2nd file is executed. as always, i really appreciate any help offered.

+3  A: 

Below

shell.run "a.bat D:\a"

add another line with another

shell.run "b.bat ...."

Or create a batch file that calls all the other batch files, and call that batch file from your script.

ozczecho
my a .bat looks like: D: cd D:\d winzip32.exe -min -a D:\a my c.bat looks like:xcopy D:\d D:\o /Emy b.bat looks like:call a.bat call c.bat when i execute b.bat,it calls a. bat but not c.bat
sushant
do the batch files work independently? ie manually run a.bat and then c.bat.
ozczecho
when i execute c.bat(xcopy D:\d D:\o /E) it prompts to enter d( for directory) or f (for files). may b that is causing the problem. how do i eliminate this prompting and set d(directory) as default
sushant
fixed the prompting problem used a "\" after destination path. but still it does not work if called simultaneously.but if i call the xcopy file first and then zippping file then it works.
sushant