How to start multiple programs with a single command Windows

No matter you are a web developer, designer, video editor a doctor or any professional who use some computer programs on regular basis. Weather it’s your browser your favorite IDE or the Microsoft Word you need it often. From the geeks to creative people out there there are certain applications you need to need often.

Yes there are options like pinning them to task bar and clicking on the icons to run them. But if you want to save time for efficient work. You can do it with a cool trick. This starter trick does include some computer stuff! But guess what it’s not hard at all. You should give it a try.

Step 1: Create a batch file:

If you are running Windows but don’t have any idea of what is a bath file then don’t worry. A batch file is some sort of group of commands located in a single file. These commands are nothing but the instructions which tells computers to do some automated work.

A batch file is name as follows: file.bat the .bat extension is necessary to let the computer identify that it’s a batch file. Creating a batch file is as simple as creating a simple text file and saving it with a .bat extension. For the ease of doing this you can use a text editor which will let you edit the file extension is NotePad++. All you’ll have to do is create a new file -> save as -> select the file type as all files -> name the file as file.bat and you are done.

Step 2: Add the starting commands.

Once you’ve created a batch file it’s time to add the commands which will start the programs for you. These commands are not that complicated that you may imagine. Okay so first thing first:
 Command to get into program’s directory:

cd path/to/program

This simple command does nothing but to enter into the desired programs directory. For finding the path to the program all you need to do is Shift + Right Click the program icon (Not the start menu shortcut) and Copy as path. This will copy the path path to your clipboard. Now all you have to do is put that path after cd in our file.bat file.

For running the program there is a even simpler command which is start.

Start programname.exe

As you can guess this is nothing but the program name which is present in the directory. So our code in the file will look like:

cd path/to/program
 start programname.exe

And guess what thats the most of it!

Step 3: Repeat for the rest programs you want to start:

Do the same for rest programs. After this your file.bat file should look like this:

cd path/to/program1
 start program1.exe
cd path/to/program2
 start program2.exe
cd path/to/program3
 start program3.exe
exit

Notice that the last exit statement closes the console after executing the commands. After this our batch file is ready which will start the programs after running it. You can either do this by directly opening this file by clicking on it. Or map it one the registry for a more hack-ish way. My next tutorial shows how to map that .bat file on the registry to run with a single command.


Originally published at www.akashrajput.com on June 12, 2016.