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

145

winlogo.jpgEver 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).


start /d C:\Windows\System32\calc.exe
start /d "C:\Program Files\
Mozilla Firefox" firefox.exe
start /d "C:\Program Files\Microsoft Office\Office12" EXCEL.EXE


Pretty simple.

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.

Here's how the commands look in the batch file to do this:


start /d C:\Windows\System32\ calc.exe
start /d "C:\Program Files\Mozilla Firefox" firefox.exe https://www.bankofamerica.com
start /d C:\finance\spreadsheets budget.xls


To open Bank Of America home page with Firefox, just add the URL to end of the command as shown above using https://www.bankofamerica.com.

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):

start /d "C:\Program Files\Mozilla Firefox" firefox.exe https://www.bankofamerica.com www.google.com

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….) .

TIP: What if you only wanted to open up some applications, but you still want to have your most used applications available in a list? Check out how to create a batch file that opens applications you choose from a list.

Comments on Windows Tip: Create A Batch File To Open Multiple Programs At Once Leave a Comment

May 20, 2008

Stephen Gilmartin @ 8:37 am #

This is a cool tip. Every morning I open 6 applications and this has really saved me time. I am really enjoying this site.

I have one question.

I can't get the code below to start Excel and open a specific work book??

start /d "I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB 2007-2008.xls"

May 28, 2008

Caleb @ 2:19 pm #

Hey dude very cool but only one thing tho, how to i open application type files or is that just something ill have to do myself

Caleb @ 2:25 pm #

nvm i just realized that if i leave out the .exe or .app

Caleb @ 2:26 pm #

nvm i just realized that if i leave out the .exe or .app it works*

June 25, 2008

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)

June 26, 2008

Susan @ 8:25 am #

Last, First 12345.dss -> Opens in ExpressScribe
Last, First 12345.tif -> Opens in MS Office Document Imaging
Last, First 12345.doc -> Opens in MS Word 03

=) Thanks for the help!!

July 19, 2008

sreenivas valaboju @ 3:44 am #

good site, very nice tips, I am openning 8 applications in single shot everyday, it is saving lot of time.
Thanks,

August 14, 2008

Vincent @ 12:09 pm #

Hey nice site working on my experiance with Batch files,

Here's my question:

I want to open 2 files in 1 program at the same time

Example:

A movie with my subtitles how to do this?

September 3, 2008

Paul Mc @ 9:30 am #

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

September 27, 2008

Big Kebab @ 9:38 pm #

Hey paul its real easy all you have to do is
c:\windows\explorer.exe "folder location"

September 30, 2008

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.

start /d “C:\Program Files\Internet Explorer” IEXPLORE.EXE http://www.cnn.com

Error: Windows cannot find 'Files/Internet'. Make sure you typed the name correctly, and then try again.

October 1, 2008

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.

October 8, 2008

aparna @ 6:42 pm #

Is there a way to switch between opened applications with commands.
Anyone please help..

January 19, 2009

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 .

January 29, 2009

sora @ 6:16 am #

im not sure exactly how but there is a command thats executed whenever the internal (bios i think) time reaches the inputted time

thanks for this i open tons of firefox pages everytime i come home just put it in the startup directory

i had a small problem with a word file but i just put it straight into c:/ lol bad idea i know but it worked

February 25, 2009

taras @ 1:58 pm #

thanks!!!

April 16, 2009

yeah @ 3:44 pm #

thnx for those comments i learned a lot from those comments..now i can open a folder with batch files..wating for a more complex commands list in tnis site..

May 29, 2009

Shailaja @ 1:44 am #

Thanks for easy comments; I though creating batch files is a big difficult thing but by following those steps its very smooth ……….thanks a lot.

June 16, 2009

Sree @ 3:46 am #

Hi,

I just want to know using a batch file how to open web page which prompts for username and password, say example gmail.

Please let me know the cmd/code that is used in a batch file to open web pages that needs username and password

Thanks in advance,
Sree.

June 24, 2009

MPep @ 9:36 pm #

@Stephen Gilmartin

I wonder if you should be using something like this:
start /d "I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB" 2007-2008.xls

Note that I contained the folder, and then located the .xls file outside the brackets. Does this work for you?

July 27, 2009

Mat @ 6:22 am #

Hi,

I want to open 3 command prompts those will be pointing to

cmd1 should point to 'C:\Tomcat'
cmd2 should point to 'C:\Tomcat\lib'
cmd3 should point to 'D:\Test'

Also i need to open 2 file locations(2 different windows)
1) C:\Program Files
2) D:\Lab

How can i do these all in a single bat file? I need to open the above listed windows in a single click

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.

September 8, 2009

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??

Robert @ 6:48 pm #

Thank you so much.. you are right.. not all the packages are the same… got it.. Thanks alot

October 9, 2009

Mehavel @ 12:21 am #

Hi,

Thanks for the tip. I have a doubt. I used the command

REM Open First Command Prompt
start cmd /k cd \Tomcat

Mehavel @ 12:24 am #

Hi,

Thanks for the tip. I have a doubt. I used the command

REM Open First Command Prompt
start cmd /k cd /D D:\Seprelease\buildwar

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

October 31, 2009

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.

Even take a lot of time to delete them.
Please help me out????

November 6, 2009

naruto-chan @ 6:01 pm #

how would i open the run app (this thing)http://i805.photobucket.com/albums/yy335/naruto-chan-/untitledhygjhkj.jpg

November 7, 2009

naruto-chan @ 1:06 pm #

it didnt work
im using windows XP
can you give me the entire thing to typed out with the
start /d "(location)" (file name)

naruto-chan @ 11:46 pm #

the problem im getting is that is is opening this [IMG]http://i805.photobucket.com/albums/yy335/naruto-chan-/rutioit87iufniuw7q38.jpg[/IMG]

November 21, 2009

@neil @ 11:23 pm #

Can you please help me to create batch file for opening few application in some time interval and website with id and password directly after running a batch file.

Please need your help guys would be appreciate if some one descirbe with sample example

Thanks hips in advance cheers…

December 4, 2009

Marcio Werner @ 1:00 pm #

@Stephen Gilmartin

Try this (3 separated commands):
I:
"I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB"
"2007-2008.xls"

It worked for me (I'm using XP).

Good luck!

December 11, 2009

ganesh @ 10:35 pm #

Can you please help me to create batch file to system restore in windows xp and windows 2000 proff.

December 14, 2009

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.

January 5, 2010

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 :(

January 7, 2010

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 :)

January 23, 2010

Bhupendra Jesalpura @ 1:55 am #

Dear Sir;

I want to create a batch file which run below command.

I have Lsclient.exe shoud run from D:\projects folder.

D:\projects\Lsclient.exe TEST5.

Test5 is my sql server.

How to create a batch file that run above command. Plase do needfull.

With Regards
bhupendra jesalpura
network admin

January 25, 2010

Watcher @ 11:35 pm #

How do you open youtube through a batch file?

January 26, 2010

ganesha @ 2:13 am #

ALT+TAB: Switch between open programs

January 27, 2010

Watcher @ 10:38 pm #

Is there a untraceable message code? If so, what is it?

January 29, 2010

Techstarts @ 2:19 am #

Thank you so much for this simple trick.

January 30, 2010

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*.*

Please help me out????

I really appreciateyr help.

Akon

March 19, 2010

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,

To create a pause use something like this:
"ping 127.0.0.1 -n 5 > nul".
The 5 is the pause, experiment until you are happy. Of course omit the quotation marks, :-)

MPep

March 21, 2010

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.

March 30, 2010

Pasi @ 6:34 am #

Great tips on this site!
Can someone tell, if it is possible to open applications with batch command at certain display or screen coordinates when using multiple displays (dual view)?

April 6, 2010

Helen @ 5:42 pm #

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!

April 21, 2010

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!

May 1, 2010

Evan @ 12:42 am #

Hey this is cool but is there a way to open up a file when you open up the folder?
like you click on the folder
and a content of the folder opens up as well?

May 3, 2010

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.

Tanks for your help!!!

May 9, 2010

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"

May 13, 2010

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.

Any way to open a new .xls file from already-open Excel app?
Thanks

May 16, 2010

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.

June 9, 2010

ram @ 3:12 am #

hey guys, pleas tell me how to make a message from batch file in a window…
r u getting me….

message should be displayed in a smaall window…. as goodmorning ram

biscuits @ 6:23 am #

Hi, love this batch file – I use this to open multiple browsers. My only problem is I need to open some IE browers without any extensions (add-ons) can this be done from the batch file start cmd.

I have tried to add the command -extoff to the end but this doesnt work

June 15, 2010

Bob @ 7:41 am #

start iexplore.exe

Biscuits @ 10:28 am #

@Bob:

but that would only open normal internet explorer with add ons. I was wondering if it possible to open the version u can find in acessories/program/ie no add ons

June 16, 2010

aiman @ 5:00 am #

E:\per>start /d D:\wamp\bin\apache\Apache2.2.11\bin\httpd.exe
The current directory is invalid.

E:\per>start /d D:\wamp\bin\mysql\mysql5.1.30\bin\mysqld.exe
The current directory is invalid.

June 19, 2010

dma1008 @ 9:24 pm #

nice batch commands here! thanks for the useful tips WTN! good job
what is the possible batch file command to delete browsing history of firefox(cookies etc), iE and windows itself(temp files, visited network places that appear on run)

thanks, hoping for your reply and help thanks
more powers!

June 23, 2010

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

June 28, 2010

JOHN @ 4:57 am #

how can i open my doc file (ms word file) that has a password using batch file command ..thanks.

July 3, 2010

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:

START C:\Users\Brandon\Music\"Oh my gosh.mp3"
I hope this helps someone.

(You will have to change the script accordingly to fit your settings):
START :\Users\\\
or START :\Program Files\\

July 9, 2010

Nick @ 5:10 am #

This is really useful thanks alot.

I have it opening a couple of work programmes. Is there anyway i can get it to log me in also?

So it open's then Auto Type's my login details.

Thanks

Nick

July 13, 2010

DON-anwer @ 2:26 am #

whats wrong with you guies, what question i ask what is this answers, i want to create a batch file for monitoring my processos performance, not bulky applications, not other things.

July 15, 2010

Mega Muffinz @ 10:49 pm #

Is there a way to open pictures with a batch file?

Mega Muffinz @ 11:03 pm #

start /d "c:\ProgramFiles\Hypercam\Data>c:\windows\system32" rundll32 "c:\windows\system32" shimgvw.dll,imageview_fullscreen "c:\ProgramFiles\Hypercam\Data" Splash.bmp
start /d "C:\ProgramFiles\Hypercam\Data" HyCam2.exe

What am I doing wrong?!

July 17, 2010

Abbs @ 9:52 pm #

hi all,

im trying to make a batch file that would accept parameters that are needed to decrypt a certain file. the exact command that i need to do is

gpg –output [filename of decrypted file] –decrypt [filename of encrypted file]

my windows application will call the batch file and send the parameters thru it. is this possible?

thanks in advance!

July 30, 2010

Joseph @ 2:24 am #

Hi All

im trying to make a batch file that will do the following things.

1. should move to the given path
c:\input\processed\redwine

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.

regards
Joseph

August 9, 2010

Vergajo1 @ 4:55 pm #

do your homework, PUNK.

August 24, 2010

Radu @ 5:12 pm #

Please help my!

How can I make a .bat file (or something else) that someone can install it in the computer and, after
installing, the computer must open this automatically

start /d "C:\Program Files\Mozilla Firefox" firefox.exe
http://www.google.com

after 10 minutes after openning it, everytime he openes the computer.

August 27, 2010

swapnil @ 9:20 am #

Hey guys,
Will u plz help mi to create batch file for running Turbo c.

M accessing turbo c through DosBox0.72

and also let me know how to create batch file for directly running any program of c and c++ after it is compiled once.

Thanking U in advance.

Jane @ 5:52 pm #

Is there a way in a batch file to close a Windows program? I want to open Firefox and then close it after a few seconds.

Thanks.

September 6, 2010

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)

September 14, 2010

kennyb @ 9:04 am #

Thanks for a great article.

I have a question.

I can get your example to work fine, but when I try a batch file containing the following, only the first safari application opens. I am on Windows 7:

start /d "C:\Program Files (x86)\Safari\" safari.exe http://google.com/
start /d "C:\Program Files (x86)\Safari\" safari.exe http://yahoo.com/

Mukesh Sharma @ 11:45 pm #

how to get active browser url using batch file and give this url to another batch file to open with another browser?

September 15, 2010
September 16, 2010

kennyb @ 8:09 am #

Thanks for the response.

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.

start /d "C:\Program Files\Mozilla Firefox" firefox.exe http://www.google.com http://www.yahoo.com
start /d "C:\Users\Kennyb\AppData\Local\Google\Chrome\Application\" chrome.exe http://www.google.com http://www.yahoo.com
start /d "C:\Program Files (x86)\Opera\" opera.exe http://www.google.com http://www.yahoo.com
start safari.exe http://www.google.com
start safari.exe http://www.yahoo.com

Additionally, I use a technique described at http://blogs.msdn.com/b/tonyschr/archive/2007/01/19/ie-automation-amp-tabs.aspx to facilitate testing in ie8 (and in ie7 through a Virtual PC running XP Mode).

I'm also able to run a batch file (another Virtual PC running XP Mode with ie6 installed) which enables me to test in ie6 (though this opens a new window – of course – for each page).

start iexplore.exe http://www.google.com
start iexplore.exe http://www.yahoo.com

So, I can test all of the browsers I want to with a few batch files – opens up heaps of pages – simplifies my testing process.

Thanks for your great article which got me started.

November 3, 2010

Chuks @ 2:50 am #

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!!!!

November 8, 2010

Pooja S @ 3:58 am #

Hi,
Really amazing tips.

I want to open several command prompts and run some commands.
Please help me in achieving the same.

Its really urgent.
Waiting for your prompt response in solving my issue.

Thank you all in advance..

November 17, 2010

-WR @ 4:30 am #

These are great tips but how do I make bat file open 2 programs and then close another one?

for example:

start /d "C:/files/files/files" program1.exe
start /d "C:/files/files/files" program2.exe

after both are started, i want to close program2 automatically.
how to do that?

November 29, 2010

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:

December 14, 2010

Jack @ 10:41 pm #

Thanks a lots, I have been searching google for this for min 20 hours.

And now I am using a script to play my favorite music on Computer startup.

@echo off
choice /d y /t 30 > nul
if not exist "D:\Program Files\VideoLAN\VLC\vlc.exe" echo Vlc player Is not installed. Please download & install from http://www.videolan.org/vlc/
if exist "D:\Program Files\VideoLAN\VLC\vlc.exe" goto music
choice /d y /t 1 > nul

goto exit

:music
start /d "D:\Program Files\VideoLAN\VLC" vlc.exe "D:\Users\Public\Music\Playlists\Hemanta.m3u" -Z –qt-start-minimized –no-qt-system-tray –no-qt-notification

:exit
exit

December 23, 2010

Rory @ 3:19 pm #

Great tips, thanks so much.
Can you tell me how I would launch IE on XP then close it after 5 seconds using a batch file?
Thanks in advance.
Rory

January 10, 2011

Jack @ 5:02 am #

This is very helpful!

Now, my routine "opening" of sames files and programs can be done with one click!

Thank you very much.

- Jack -

February 5, 2011

cainen172 @ 10:42 am #

hey this is what ive got

start /d C:\Users\cainen172\Documents\Dev-Cpp\programs_i_made\adventure_story\pers._adventure_story
start /d C:\Users\cainen172\Documents\Dev-Cpp\programs_i_made\adventure_story\shipmap.jpeg

(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

February 16, 2011

dhiman nandi @ 3:00 am #

how make a bat file for editig or delet a line on doc fle

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

Les @ 7:17 pm #

I would like to retrieve the create dates in a network directory and write them back to a file and send the file to a specific IP address. Is this possible using batch code?

March 7, 2011

Abhi @ 3:40 pm #

Hello,

Thank you all for the cool tips!

I have one doubt. I have 2 batch files that I need to execute sequencially and not in parallel. The 2nd batch file execution will start only after 1st one gets completed.

Is there any workaround for this, apart from putting in time delay.

Help is much appreciated.

Thanks,
AB

March 9, 2011

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:

@echo off
start /wait %CD%\Software\bullzip.exe /s
start /wait %CD%\Software\flashplayer.exe /s
start /wait %CD%\Software\winrar.exe /s

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.

Thanks in advance!

March 16, 2011

Chris @ 11:51 am #

@Merle Sinclair: to open up IE you can just type
@echo off
REM
start IE http://www.google.co.uk

That would then open up google

March 23, 2011

Sherry @ 6:17 am #

I am trying to open following from batch file:

START /d "C:\Program Files\GSD – Activity Tracker" GSD – Activity Tracker_1.2.exe

it has spaces all the way and last exe name also does have spaces. Please let me know how this can be run because it is not accepting spaces in the names after the path.

Thanks,
Sherry

April 11, 2011

Jane @ 9:14 am #

Any chance I can have it open multiple folders and rearrange them side by side?

I am currently using something like below for my needs:
@echo off
explorer "C:\Folder 1"
explorer "C:\Folder 2"
explorer "D:\Folder 3"
explorer "D:\Folder 4"
start /d "C:\Program Files (x86)\Program1" Program1.exe
start /d "C:\Program Files (x86)\Program2" Program2.exe

April 21, 2011

sdfghjjjjjjjjjjjjjjjjjjjj dfghj @ 2:15 pm #

@Stephen Gilmartin:
just delete the /d

May 4, 2011

Mike @ 3:04 pm #

Any idea how to open multiple apps when one is an application hosted on a network server (e.g., if you're working for a corporation that has a dedicated server for a particular application).

Thanks.

May 24, 2011

Brian @ 7:05 am #

@Brandon: I have come up with a few different codes that may work. Though I am unable to test these codes without the file, it has been successful in the past.

START "C:\Users\Brandon\Music\Oh my gosh.mp3"

Or

START "" /d "C:\Users\Brandon\Music" "Oh my gosh.mp3"

Why the "" at the beginning? Without this, the batch file will recognize "Oh my gosh.mp3" as the title command. Try the codes and let me know how that works for you!

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:

start "" /d "I:\Service\Service Systems\Customer Software DB" "Software Sales and Billing DB 2007-2008.xls"

OR

start "I:\Service\Service Systems\Customer Software DB\Software Sales and Billing DB 2007-2008.xls"

Any questions let me know!

June 6, 2011

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

July 23, 2011

exactly @ 6:22 pm #

how to "install" many apps at once click ,, ?? any idea ?? thanks, i think it will be make time safer for windows user

July 25, 2011

Eliminator @ 1:24 am #

hey it worked for me just fine but i have 2 problems>>>Here is my command listing:

start /d "C:\Users\******\Downloads" netscan.exe

start /d "C:\Program Files\Ambient Design\ArtRage Studio Pro" ArtRage Studio Pro.exe

start /d "C:\Program Files\CCleaner" CCleaner.exe

start /d "D:\USERS\******\SOFTWAREZ\others" Core Temp.exe

start /d "C:\Users\********\AppData\Local\Google\Chrome\Application\" chrome.exe

start /d "C:\Program Files\Internet Explorer\" iexplore.exe

exit

the problem is with Art studio pro it gives an error ..tht i think is because of spaces and the same problem with core temp again becoz of space i guess any idea how to run this program

THANKX IN ADVANCE

August 3, 2011

TuanVo @ 9:46 pm #

you need to put any ONE-STRING-BUT-CONTAINS-SPACES into quote.

August 4, 2011

Eliminator @ 3:16 am #

@TuanVo tried but cannot get desired output..heres what i did:
start /d "D:\USERS\******\SOFTWAREZ\others" Core Temp.exe

start /d "D:\USERS\******\SOFTWAREZ\others\Core Temp.exe"

start /d "D:\USERS\******\SOFTWAREZ\others" "Core Temp.exe"

start /d "D:\USERS\******\SOFTWAREZ\others" "core_temp.exe"

start /d "D:\USERS\******\SOFTWAREZ\others" "Core-Temp.exe"

tried but still couldnt get it!!!!

August 13, 2011

Derek @ 11:00 pm #

Hi, i tried to open 2 applications with this code:
Start Minecraft.exe
start /d C:\desktop\dereksbackupfile\minecraftserver\minecraft_server.exe

minecraft.exe opens up fine but when it is supposed to open the other file it doesnt open, instead it opens up command prompt. Idk what is wrong

Derek @ 11:25 pm #

And when you open an internet browser tab, how do you open 2 different windows?

August 16, 2011

lavanya @ 12:02 am #

hi,
I want to switch between tabs using batch file commands. Can any one guide me in this.
example: c:->systemproperties->advanced tab->performance->settings

awaiting for reply.

Freznel @ 10:25 pm #

Hi all,

Thank you for posting all of these tips because I am learning bat for fun and it answered a question that I couldn't find an answer to anywhere else.

Here was my question: If the final name has a space in it, how do you program the start line below wont work:

start /d "[path]' File Name.exe

here is the solution that worked in XP for me:

change the /d to "" so it is read:

start "" "[path]" File Name.exe

This will launch the file name with the space in it instead of giving you an error stating that the first word can't be found.

Hope this helps someone else – here is how the actual code looks:

:camera
cls
start "" "C:\Program Files\Canon\EOS Utility\EOS Utility.exe"

color 2
echo Running Command!
ping 1.0.0.0 -n 1 -w 1500 >NUL

goto menu

December 23, 2011

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…

January 7, 2012

Andrew @ 11:57 am #

@Mega Muffinz:
missing a space between program files

February 5, 2012

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:

@echo off
start "Word" "\\shared drive path\document name1.docx"
start "Word" "\\shared drive path\document name2.docx"

i tried using read only switcher /r:
@echo off
start /r "Word" "\\shared drive path\document name1.docx"
but isn't helping me!

could you please help me to avoid clicking on the "read only" button using a batch file and open all these docs at once

February 24, 2012

Kevin Cook @ 2:24 am #

Great tutorial was in search of such things as i have to lot of tasks on my system on daily basis. Now simply i will make a batch file for all the programs i need to work on daily basis.

March 30, 2012

Vid @ 1:25 am #

Hey, i need to create a batch file which should launch the same URL 100 times in different windows. i tried for loop. but it is not working.

Please Help!!

April 20, 2012

theproles @ 10:11 pm #

This is an amazing time saver, thank you.

If you want a shorter, simpler version to open a web browser and multiple tabs use this:

start "url1" chrome http://www.webpage1.com http://www.webpage2.com http://www.webpage3.com

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:

start "url1" chrome http://www.webpage1.com
ping -n 6 127.00.1>nul 2>nul
start "url2" chrome http://www.webpage2.com
ping -n 6 127.00.1>nul 2>nul
start "url2" chrome http://www.webpage3.com

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".

Hope this helped.

May 16, 2012

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!

June 4, 2012

Anthony @ 5:11 am #

Thankyou so much for having this still up! 4 years later and its still sought after! Thanks again.

Sag1v @ 6:25 am #

Hi, great Thread though same question again and yet no answer…
lets say i want a batch file that will open Gmail and fill in user and password with a single click.
is it Doable?

thanks!

June 9, 2012

Booker Hessel @ 11:45 am #

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.

July 12, 2012

Alex Amaral @ 6:11 am #

Very nice tip. It was just I´m looking for. Thanks.

July 13, 2012

Anjali Ingale @ 11:10 am #

I have one question here..
I want to start4 application in order.(1,2,3,4)
But before starting the applications it should check in the tasklist if process is runnign or not.

ex. 1. abc.exe -un -pss
2. xyz.exe
3. abc.exe -un1 -pass
4. sample.exe

If the process is not running in the tasklist then start it. if it is running then start process 3
there should be 2 instances created with the same name and the two diff applicaitons should run.

Once both the app started then start process2 and then 4

Anjali Ingale @ 11:13 am #

@Anjali Ingale:

can some one please help me…

September 25, 2012

rayan @ 1:10 pm #

Hi Everyone,

I have definitely learnt a lot thanks to all of your comments.

My question: i have 3 combined Excel Add-in applications that i have to open on a shared file.

When opening the 3 apps at the same time, it opens an Excel file.

I am trying desperately to find a way to open the 3 Apps using the "Start" command THEN from that Excel sheet to open a Specific Sheet located in another file.

Simply combining both Paths together runs an Error.

If any of you guys can help, i'd really appreciate it.

Note: Also if someone knwos the command to Run the .Bat file at a specific time of the day, would be really helpful.

Best

R

November 3, 2013

shane @ 12:41 am #

Thankyou, very helpful and simple.

November 27, 2013

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

START C:\Programy\"SWF 2 EXE"\SAF.dll.exe
START C:\Programy\"SWF 2 EXE\SWF 2 EXE.exe"

and it worked like a charm

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

with this
@echo off
start /wait %CD%\Software\bullzip.exe /s
start /wait %CD%\Software\flashplayer.exe /s
start /wait %CD%\Software\winrar.exe /s

and thats it

the %CD% < mean start in the bat file directory

so i just made

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

cause i could learn allot from your ideas :)

January 9, 2014

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

January 20, 2014

ZeroX4 @ 9:20 pm #

@Mrigank:

@echo off
start "C:\"Games\Spelunky HD\Xpadder.exe"

OR

@echo off
start "C:\Games\"Spelunky HD\Xpadder.exe"

im also xpadder user :D

but why u need it just to use xpadder ?

zerox4@wp.pl
mail me if it wont work we will figure something out

January 21, 2014

ZeroX4 @ 5:11 am #

sorry

@echo off
start C:\"Games\Spelunky HD\Xpadder.exe"

OR

@echo off
start C:\Games\"Spelunky HD\Xpadder.exe"

no " before C:\

and i dont think u need

@echo off

mrigank @ 8:10 am #

thks its now working…

March 11, 2014

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

with regards and thanks
dinesh

March 18, 2014

Ben @ 1:50 pm #

How do I make it go to a .png file? The file is called:

water cycle project.png

How do I make this command open it? Leave an exact command in the comments or email me the answer at bencovert123@gmail.com. Thank you!

Ben @ 1:51 pm #

How do I make it go to a .png file? The file is called:

water cycle project.png

How do I make this command open it? Reply with an exact command please. Thank you!

July 5, 2014

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?

Regards,
Neel

September 19, 2014

hemn @ 3:33 pm #

i need strat application without to type username and password.
my application neeed username and password

Leave a Comment

Fields marked by an asterisk (*) are required.

Subscribe without commenting