Link to home
Start Free TrialLog in
Avatar of rdabate
rdabate

asked on

How to run multiple batch files, within on batch file.

Hello Experts,

I have about 12 Batch files that do a few simple things.  I'd like to automate them with a scheduled task.  Easy, but what I'd like to do is make one master batch file, that would execute all 12, so all I would have to do is set a scheduled task for that one master batch file.  Can you help, I'm not exactly an experts so if you could keep it straight forward, that would be great.   Thanks.

Rick
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Use the "Call" command.

In the example below, Batch #1 calls Batches #2 and #3:

' 1. bat
@echo off
Call 2.bat
Call 3.bat

' 2.bat
@echo Idle

' 3.bat
@echo Mind
ASKER CERTIFIED SOLUTION
Avatar of dinomix
dinomix

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rdabate
rdabate

ASKER

Both solutions look interesting, but should I include the path to each batch file?
If they are all in the SAME directory then you do NOT need the path.

If the batch file being called is in another folder then give the full path to it...
Avatar of rdabate

ASKER

I included the full path, so far seems to work.  Thanks a bunch
*Sigh*....dinomix posts 8 minutes after me with the same thing: USE THE CALL COMMAND