Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

calling a bat file from another bat file

Created: 20 Oct 2009 • Updated: 21 May 2010 | 3 comments

Hello all,
We are using Back Up exec 12.5 on Windows 2003 server 32-bit. We are scheduling pre commands in batch files. Is there a limitation in how Back up exec should run a pre command? Can I have multiple batch files and and call other batch files from a central batch file which back up exec uses as pre command? It is somehow not working in our case and forcing us to write a single large precommand script. Your suggestions will be useful. Thanks.

Comments 3 CommentsJump to latest comment

Ken Putnam's picture

it has been a while since I did much DOS scripting but

How are you calling from your main BAT/CMD file?

In the called scripts, to you just exit, or do you end with a "return" statement?

If this response answers your concern, please mark it as a "solution"'s picture

I am using the call command to call other bat files from  a central bat file. There is not a whole bunch of them, just two other calls from one file. The commands in them is also pretty simple, 2, 3 commands in each . All are services shutdown or startup commands.

None of the batch files have return statements.

Let us suppose (and this is how the script looks really) the main bat file that back up exec uses in pre command is a.bat

a.bat  calls other bat files as shown below:


call b.bat
call c.bat


These scripts work fine when they are executed from a dos prompt. The back up exec doesn't like either the call command or the individual scripts.  Not sure what is the limitation here. If I remove the call statments and put all of them in one script back up exec runs it fine. Thank you.

Lance Daschle's picture

Might be a silly question, but did you put the fully qualified path of the batch file?