#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2007
    Posts
    2
    Rep Power
    0

    Question Executing Multiple batch files concurrently from a single batch file


    Hello guys,

    I have a problem. I want to execute multiple batch files(currently 3) from a single batch file..Now I am able to run then sequentially one after the another
    Code:
    cd Alpha
    call run.bat
    cd\
    cd c:\tower\Beta
    call run.bat
    cd ..
    I need this batch file to run both the run.bat files located in folders Alpha and Beta in parallel(concurrently). Is there a way to do that..This will save me a lot of time as every bat file opens a login window and so i do not need to wait for the first batch to get over and then login for the second batch..

    Thanks a lot
    Ashes.cfg!
  2. #2
  3. Blowing up trees with my mind.
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Feb 2005
    Location
    Neverland Ranch, minus the touching.
    Posts
    3,382
    Rep Power
    2567
    If these are automated, I would just run them separately with a scheduled task.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2007
    Posts
    2
    Rep Power
    0
    Well The deal with these run.bat files is tht they login to a data base a retrieve info...But can u elaborate on the idea of scheduling it and how its done...i am very much new to windows scheduling etc.. thanks for such a quick reply veamon appreciate it
  6. #4
  7. Blowing up trees with my mind.
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Feb 2005
    Location
    Neverland Ranch, minus the touching.
    Posts
    3,382
    Rep Power
    2567
    instead of having one bat file that calls a bunch of others, open up the scheduled tasks and use the bat files themselves, and set the time to start on them.
  8. #5
  9. Who set my Title?
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2004
    Posts
    716
    Rep Power
    257
    You can use start instead of call to kick off the batch files - that will make them open new and execute simultaneously.
    Nobody is perfect. I am Nobody.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0
    The way to do this in a .bat or .cmd file is just to replace "call" in your code with "start". That will open a new window each time "start run.bat" is encountered and continue on with the main batch file.
  12. #7
  13. Providing fuel for space ships
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2004
    Location
    nr Edinburgh, Scotland
    Posts
    14,382
    Rep Power
    3848
    I'm pretty sure the poster has got it working, seeing as how it's been 7 months

    Oh, and welcome to the Shed.
    The No Ma'am commandments:

    1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
    2.) It is wrong to be French
    3.) It is O.K. to put all bad people in a giant meat grinder
    4.) Lawyers, see rule 3
    5.) It is O.K. to drive a gas guzzler if it helps you get babes
    6.) Everyone should car pool but me
    7.) Bring back the word 'stewardesses'
    8.) Synchronized swimming is not a sport
    9.) Mud wrestling is a sport
  14. #8
  15. Who set my Title?
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2004
    Posts
    716
    Rep Power
    257
    somebody actually registered to post what has already been posted in the post just above his Welcome to devshed btw!
    Nobody is perfect. I am Nobody.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0
    Originally Posted by LaughingBelly
    somebody actually registered to post what has already been posted in the post just above his Welcome to devshed btw!
    D'oh! Don't know how I missed that. I must need more sleep (or more caffeine).
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    1
    Rep Power
    0
    START "BATCHFILE1" CALL "BATCHFILE1"
    START "BATCHFILE2" CALL "BATCHFILE2"
    START "BATCHFILE3" CALL "BATCHFILE3"
    START "BATCHFILE4" CALL "BATCHFILE4"

    jeje 639232720816

IMN logo majestic logo threadwatch logo seochat tools logo