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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonMiddle School Assistant TeacherCommented:
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
Create a new text file and rename it to .bat. In there simply call your other batch files by using call name.bat. If they are all in the same directory then you can use just the filename.bat, otherwise you will need the full path. Your master.bat should look something like this.

call bat1.bat
call bat2.bat
call bat3.bat

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rdabateAuthor Commented:
Both solutions look interesting, but should I include the path to each batch file?
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Mike TomlinsonMiddle School Assistant TeacherCommented:
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...
rdabateAuthor Commented:
I included the full path, so far seems to work.  Thanks a bunch
Mike TomlinsonMiddle School Assistant TeacherCommented:
*Sigh*....dinomix posts 8 minutes after me with the same thing: USE THE CALL COMMAND
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.