Windows Tip: Create A Batch File To Open Multiple Programs At Once

Ever have the need to open more than one program or application at the same time?

Say it's the beginning of the month and time to pay those dreaded bills. You know you need Excel, Windows calculator and Firefox or Internet Explorer open. Instead of opening them up one by one, you can easily create a batch file that will open all three programs at once.

And while your at it, why not have Excel open the spreadsheet file you use for tracking your budget and the browser open to your Bank's home page. Here's how to do it…

First let's take a look at a batch file I created that will just open Excel, Calculator and Firefox:

NOTE:Examples and file paths are from Windows Vista. XP paths will probably be different for some programs as well as for MS Office (Office 2007 is used in the example).

The above command, start tells Windows to open a separate window to run the specified program.

The /d switch tells start command the path of the program. For starting Excel and Firefox, notice that the paths are in quotes, which is needed when there is a space in the file path.

Now it's great that all three programs open, but since it's time to pay your bills, you need to have Excel open that budget spreadsheet and Firefox open to your Bank home page so you can log on and access you checking account.

To open the Excel spreadsheet, budget.xls you don't need to first open Excel. budget.xls can be opened directly using the start command, as long as the extension or file type is associated to the program.

If you need Firefox to open more than one URL, say to Google, just add the URL like this (make sure you use a space in between URL's):

Now you're probably saying "that's great, but how do I create a batch file?".

That's the easy part.

Just open up Notepad or your favorite text editor.

Copy the commands from above and modify them to use which ever program or Office files you want open. Make sure when you copy file and folder paths that have spaces, to use quotes.

Then save the file with any name and a .bat extension (make sure it's not saved using .txt as the file type extension)

Now when you want to open up multiple programs or applications, just double click on the batch file and you're ready to pay the bills (if I can only figure out how to get the calculator to open with a million dollars from my checking account….).

Caleb @
2:25 pm

Caleb @
2:26 pm

Susan @
11:09 am

Is There Any Way To Do This When The Files Have A Different Name Each Time? Namely, Override Vista's New Feature That Won't Allow Multiple Files Types To Be Opened At The Same Time Because The Same Program Cannot Open Them All? (Sorry For Crazy Caps… Researching On My Cell Phone)

Thanks mam, just getting into learning batch commands.
There is one command i am looking for. I want to open a foder from a gui wat. Every time i try and open a folder it just selects it from in the cmd area.

If any1 knows how to oppen a folder from batch files. please send me an email. Thank you

Big Kebab @
9:38 pm

Merle Sinclair @
12:00 pm

Using your example, I tried a test to get IE open the CNN news page along with a couple other files. Since I don't have Firefox on my computer, I substituted the IE pathway. However, when I tried it, I get an error saying cannot find "Files/Internet" even though I put the entire path in quotes.

Merle Sinclair @
8:58 am

Okay, I discovered the problem, quite by accident. I copied and pasted your command line, changed the firefox info to the IE info and this time it worked. I tried the altered line alongside my original line and continued to get the error when it got to mine, although both lines appeared identical.

However, looking at my file in Notepad, I noticed a slight difference. Although I had typed both in Notepad in plain text, the quote marks on my file had curls on them, whereas yours were straight quote marks. I thought to myself, "No, that can't be it, but I changed out my quotes with yours, and TA-DA! It worked.

Since Notepad does not work with font types, I'm wondering how they turned out different. Whatever it was… it works.

Thanks for the tips! I have my batch file working perfectly with one website and four program files that open up together.

aparna @
6:42 pm

punit @
10:40 pm

is there any way for giving command
i want to open my broadband connection at a specific time like 2 am daily automatically
the shortcut of connecting to Internet is in "network connections" i want to know that how to make a batch file for doing this
now i want to press the "connect button " so tell me how to do that
Anyone plz help me .

Immi @
11:01 am

I want to insert a time delay after launching every application so that all applications open 1 by 1 and they dont have to fight for CPU time and slowdown the hard disk reading.
After Googling i came through this command:
"TYPE NUL | choice /c:delay /td,10 >NUL"
But it's not working or i am unable to use it,
Can anybody told me how to insert time delay in this batch file.
Thanx in Advance…

Immi @
11:18 am

I found the solution to insert time delay in a batch file
What I am doing is that I am using ping operation to insert time delay
"ping -n 6 127.0.0.1"
The above command I am using in my batch file to insert 5 mins time delay between 2 application.

Robert @
3:09 pm

Hi, im trying to install a program with the batch. but my question some programs works just fine with the batch but some is still asking me to click where the program should be installed, license aggrement and so on.. what can i do in my batch to skip all those steps and install silently??

It depends on the program setup installation. Some allow you to use a switch (such as setup.exe /s). You may want to check with the vendor of the program or look for a readme file that details how to do this.

Mehavel @
12:24 am

and this opened a command prompt pointing to the exact location. after this if i want to execute a command

D:\jdk1.5.0_01\bin\jar.exe -cvf ace.ear *
that is it should be D:\Seprelease\buildwar> D:\jdk1.5.0_01\bin\jar.exe -cvf ace.ear * in the command prompt before i hit enter. How do we make this job automated using batch. your help is most welcome

Rohit @
12:24 am

Hi,

I just want to create a batch to delete unnecessary files in the system like:
cookies
HIstory
prefetch
qurantine folder of the antivirus
temp
%temp%
recent documents files
temporay internet files
which make my system to much slow.

ganesh @
10:35 pm

Josh @
2:01 pm

Thanks, this helped me.. I was trying to open a program just by typing ["C:\Program Files\Sandboxie\SbieCtrl.exe"]- which opened the program but left the cmd prompt window open. using [start "C:\Program Files\Sandboxie\" SbieCtrl.exe] fixed it.

Roger @
6:13 am

Great tip! The only thing I should notice is some words on delayed execution. If you want to start one program after another one have closed, use "&" operator between them (without commas). And if you create batch files quite often, I advice you to try Dr.Batcher (http://www.drbatcher.com). This tool is really handy but not freeware

Andrew @
8:35 pm

hey guys can anyone help me with the following: i want a batch file that first closes explorer.exe and then runs it again with administrative rights (im on windows vista and it needs to be administrative)

or if you know the command to close a file/application (like "start" runs it) that would be great too

Watcher @
10:38 pm

akon @
3:20 am

Hi Guys,

Can you please help to delete some specific file from below directory path using batch command

D:\cdata\appdata\spPC\auxxxx\lp0001\server
# Delete all files in this directory that start with wtotsetdr*.*
DO NOT DELETE THE wTOTSETBK.* FILES!!
If the files have been deleted but it hasn't resolved the problem, then delete all files in the same directory starting with ts*.*

Debabrata @
12:41 am

its works, but what i want i want to open each line after a short ti like 1st line then wait for 2 min then close that one and then onen 2nd one then close it then open 3rd one and close it and so on …. please help me, thanks

Debabrata @
12:54 am

for example……
open http://www.gmail.com wait for 50 sec then close gmail.com and open yahoo.com then wait for 50 sec then close yahoo.com and open orkut.com then wait for 50 sec then close orkut.co and so on………

MPep @
1:41 am

Debabrata @
11:37 pm

Thanks this 5 mean 5 sec time, and what i want, suppose when i run tgis bat file what i want there will be several web address like gmail.com, yahoo.com, orkut.com, google.com, etc….
1st it open gmail.com, then wait for some time which i want to customise (may be 50 sec or 40 sec) the in the same window i want to open the next address i.e. yahoo.com, then wait for some time then in the same window i want to open orkut.com, and so on.
here what happen its opening new window or tabs.. this i dont want.

Simply brilliant! I was having the devil of a time trying to get my Jing-produced videos directly from a PowerPoint presentation (Action Setting/Mouse Click). This was just the thing…fantastic. Thank you very much!

Jai @
5:51 pm

This is really great work. I have set it up to open 4 firefoxes to different pages, as well as thunderbird and 3 other programs. Is there a way to make them auto-arrange on the screen? Id like the 4 firefoxes on the right screen 1 in each quadrant and then the rest on the left screen with thunderbird open on the left side and the 3 other apps open in their own quadrant. Im using winsplit right now to make them all fit perfectly.

Itd be nice to be able to throw this in the startup folder and have everything set up the same way every time. I had been looking at software solutions as well. Any help is greatly appreciated!

Evan @
12:42 am

Gerson @
3:37 pm

Hey WTN, you've really helped me to open 4 firefox browsers, 2 other aplications and email client. For those who need to open separate instances of firefox browser add -new-window after firefox.exe Ex. start /d "C:\Program Files\Mozilla Firefox" firefox.exe -new-window
Now I'm trying to find a way to setup an specific size of the browser as well as it's position on the desktop.

William Gracie @
12:32 pm

I tried this method and it did not work. Nothing opened.
I followed a method suggested by another website and all of the programs I listed opened properly.

Instead of using start /d for each line, I used Start ""

When creating the batch file with notepad do the following:
Enter path to each program you want to run in the notepad. Remember to make new lines for new programs, i.e. press Enter after one program, then write the second program, hit Enter to make a new line and then write the third program and so on.

While writing paths to new programs, put Start “” before each program. Remember to write Start, give a space, then write “” and again give a space, now write the path to the program.

This is what I created and all three programs opened:
Start "" "C:\Program Files\Registry\RCrawler\rcrawler.exe"
Start "" "C:\Program Files\Portable\Install\Revo Uninstaller\revouninstaller.exe"
Start "" "C:\Program Files\File Management\SuperFinder\SuperFinder.exe"

Sally @
7:10 pm

Thanks, but when I leave work, Excel is already open.
When I use a batch file to open an Excel file the next morning, it opens the Excel app anew (new window), and Excel complains that my personal.xls (my macros in the already-open Excel) is already open.

Suzi @
12:44 am

I have an .exe file with some push button,text box and dialouge tab. would you please help me how can i write a batch file to run my exe file and then push my selected button or swith between tab in the program.
In other words i like to take control of my exe file and automatically do my job on that.

chris @
3:15 am

i am trying to make a batch file that shuts down comp. and also change windows login password. i know it can be done with net user * but how do i get it to input the password i want.
so far i have this, "net user chris * shutdown -f -p" after the * it will ask for password. the point of this tho is to change pw without having to type anything.and then shutdown. please help. i know this isnt related to your topic of batch files but you seem to know quite alot. thank you in advance

JOHN @
4:57 am

Brandon @
3:26 pm

This site has helped lots, but I think I've conjured up a separate code that may perform the same action. I was trying to open "Oh my gosh.mp3", but it was only reading "Oh". Anyway, here is what I've come up with:

Joseph @
2:24 am

2. should check whether there is any new file received for the current date.
e.g. 100010_redwine_exp.txt

3. if file has been received for current date then should check the file is not '0' kb file.
if file not '0' kb,
the output on the screen should be "file received" and exit the command prompt
if the file is '0' kb then
the output on the screen should be "file received but no data" and exit the command prompt

if no file has received then
the output on the screen should be "file not received" and exit the command prompt

can any one help me on this please.
kindly let me know for any clarification.

Jane @
5:52 pm

Chips @
5:21 pm

hello world :p
i managed to get my program open with a batch file, but
can i, in additon run a second program ( a reminder:"remindme") to run a script
for ex:
open my audioplayer
10 sec delay
run reminder to open a specific playlist( it opens on startup, so just open the program will do)

kennyb @
8:09 am

I was looking for a way to test a bunch of pages – in a number of browsers – throughout a site (helpful when I've made css changes that might have an effect of lots of pages or the like).

I ended up with the following batch file (using google and yahoo in this simplified example) which is working well.

Safari works now, BUT I have to have safari open BEFORE running the bat. I also chose 'Automatically' for the "Open pages in tabs instead of windows:" option in the "Tabs" tab in Safari Preferences and all of my test pages open in a new tab rather than opening another Safari window.

This is all so cool, but why the hell does windows not embed such functionality in their new editions??? Why do I have to write batch files when Im using an advanced GUI?? Why do i still have to use third party software or powertoys to do things like >> resize images on the fly? Why does Microsoft consider these little tools worthy of including in new editions of Windows? I Like Windows 7, but im surprised such little tools did not make the final cut!!! we should have stuck with DOS, if we were going to be writing batch files!!!!

jabbertag @
4:31 pm

Hi, I need a batch file, to open CONCURRENTLY, the same LOGIN page with two browsers, enter LOGIN_ID and password on each, all SIMULTANEOUSLY, and then press LOGIN button on each. Would appreciate the help
@Watching The Net:

(the directory is to long so it took up four lines. and where you see a "_" that is where there is a space in the directory.)
but it keeps coming up with an error and then the window quickly closes down and if there are any spaces then it just comes up with another warning and i just cant get it to work

dhiman nandi @
3:00 am

Melvin @
2:45 pm

Hi…
This is a great idea, now I can open many applications at once.
However my concern is I am not able to open word document. The command I am typing is
start /d C:\Documents and Settings\Dialer\Desktop\Melvin Dont delete Phrasing of different questions.docx
Here the document is "Phrasing of different questions.docx"….Please suggest me ..
Thanks

1) – use a scheduler that can be setup to run the second batch file after the first batch file completes.

2) – combine the two batch files into one batch file

3) – use the "call" command which will run (call) the second batch file. In your case the call command should be at the end (last line) of the first batch file. For more info on the call command see this explanation and this example.

R. @
11:53 am

Hello all,

First of all, thanks for all the great tips!

Second, I have a situation of my own: I have created a .bat file on my USB stick with installation files (.exe) on it, which I want to be able to automatically install on every other computer (at work). It works very well! Only problem is, if I add a new installation file in my 'software directory', I have to edit the .bat file and add a new line for every new file.

Is it possible to have the .bat file install/run/execute EVERYTHING within that specific directory, without having to name each program/file in the directory?

FYI, I am now using the following (example) commands for my .bat file:

I put in the %CD% command for my USB stick, so that it automatically detects the USB volume drive. This way I don't have to change the station in the .bat along as the station changes with every other computer.

Brian @
7:08 am

@Stephen Gilmartin: An above comment is one solution. You can still use what you have, however, please do note that /d means Directory. So with the code being:
start /d "I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB 2007-2008.xls"

That says "I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB 2007-2008.xls" is the directory. Can you spot the issue? That is a file, not a directory. I learned this the hard way by crashing my applications left and right lol…

You can use your current code, and while you are very close to correct, it should look like one of the following codes:

sag1v @
4:03 pm

Hi guys nice site!
is there a way to create a batch file that opens gmail or any other webmail and automaticly fill in the user name and password?
saw some people asked it here but no answer yet.
thanks

Jackson @
12:22 pm

what I would like to do is… assign an unused FNC key to a specific program say system restore…and have it avail to the keyboard poll upon startup…like with safe mode, helpfiles etc..this possible?
thx in advance…

Andrew @
11:57 am

vrl @
9:39 am

I need to open many MS word and MS excel docs from a shared drive every day, these docs are password protected or read only – so a prompt window pops up forcing me to click on "read only" button when trying to open them using a batch file:

You can replace the word "chrome" with whatever web browser you use, so internet explorer would be "iexplore", and firefox would be "firefox". You can determine the correct name for your particular web browser by opening your chosen web browser, opening the task manager, then search for the name of your browser as it appears in the "processes" tab in the "image name" column. Simply use the name of the process without any extensions or other text that follows.

If you would like the batch file to pause when opening multiple tabs simply use this command:

The "ping -n 6 127.00.1>nul2>nul" command tells the batch file to pause for 5 seconds before executing the next command. I believe it's 5 seconds, as "-n" subtracts 1 second from the total. I don't claim to understand this, but it works nonetheless. So for 10 seconds use "-n 11".

mike @
11:20 am

Hello,
1. Running win7 and cant find the "target" or executable for Outlook 2007. When I right click and go to properties, target reads: "Microsoft Office Standard 2007". Pls advise.
2. In win7, can this batch file be pinned to the taskbar?
Thx much!

Nice post. I was checking continuously this blog and I am impressed! Very helpful info specifically the last part I care for such information a lot. I was looking for this particular info for a long time. Thank you and good luck.

shane @
12:41 am

ZeroX4 @
12:55 pm

ok so 1st of all im trying to get all my programs in portable version but sometimes there does not exists portable version of program i use i often reinstall windows so configuring each time every single program and app after reinstallation is not an option for me thats why i need portable ones than i just copy from old hdd to new hdd folder with portable programs and they are ready to run even so i repair PCs so i need portable versions of many programs so i can fast end easy set for example firefox google chrome or opera at customers pc without setting it up with portableapps.com i just downladed them configured and now i can trow them to someones PC just by copy and paste

now my problem is that i have SWF2EXE program which converts SWF files to stand alone EXE files

but this program is portable as long as you have c:\program files\common files\swf2exe\saf.dll

so i created self extractor with that file and i found this page while was trying to launch multiple files at once so i can 1st install dll each time i launch program so there would be no problem

but there was a problem that sometimes i can give that program to friends which wont have it in same directory that i do

so my natural idea was to do this

START SAF.dll.exe
START SWF 2 EXE.exe

but it worked half way cause it only installed dll but did not launch the program
than i realized that problem is that 2nd line have space so i made this

START SAF.dll.exe
START "SWF 2 EXE.exe"

still no luck

so i remember that bat files have command that mean start in the same directory that bat file was started and i was hoping that someone here mentioned it here so i searched all comments and so i found this comment by R. @ 11:53 am

START SAF.dll.exe
START "%CD%" "SWF 2 EXE.exe"
works like a charm now i can use program called bat to exe converter hide all program files in sub folder and create stand alone EXE from BAT file and create self extracting file for it

sooo THANK YOU VERY MUCH ALL OF YOU NOT ONLY THE GUY WHO MADE THIS TIPS BUT ALSO ALL PPL THAT COMMENTED THEIR PROBLEMS AND IDEAS

Mrigank @
7:52 am

Hey, when I write
@echo off
start "C:\Games\Spelunky HD\Xpadder.exe"
start "C:\Games\Spelunky HD\Xpadder.exe"
It just opens the cmd with the name of the program in title bar, the program doen't open, why??any fix… Please reply ASAP

mrigank @
8:10 am

dinesh @
1:40 am

I have to create .bat file for creating configuration settings for IE .so that IE configuration will be same in all systems in workenvironment istead of changing everytime,is this possibe? guide me if can

Ben @
1:51 pm

Neel @
7:24 am

Hello All,

I just need help with a file that I've created. I've run the file and it opens four different tabs with four different URLs in Chrome. Which is what i wanted it to do. But, for a few pcs they do not have chrome here so I want the batch file to give the user a box asking for which browser they want to use IE, Chrome or Mozilla and then the user clciks on the option and it opens 4 tabs in that browser with those URLs … I know I am asking something which is weird and don't even know if it is possible. So please let me know if it is possible and if yes how and what command do I put in?

@Irfan Qureshi: You are using period (.) more than once in the command. Period (.) should only be used with file names, not with folder names. If you have folders with a period in it's name, go back to those folders and rename them with out the period.

When completed, re-write the command to something similar to the following: