cancel
Showing results for 
Search instead for 
Did you mean: 

calling a bat file from another bat file

telab2020
Level 2
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.
3 REPLIES 3

Ken_Putnam
Level 6

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?

telab2020
Level 2
Hi,
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
Level 3
Might be a silly question, but did you put the fully qualified path of the batch file?