Have you ever wanted to open several related files and/or applications at once by simply clicking one desktop shortcut? Well, with the help of a handy little Windows file format known as a batch file, you can.
What’s a batch file, you ask? A batch file is a text file which can execute a series of commands in Windows and the outdated DOS operating systems. Batch files can perform a number of useful functions but for the purpose of this article, we’ll stick to their ability to be used as a shortcut which can open multiple files and applications.
In order to create a batch file in windows, right click any empty space on your desktop. In the pop up menu which appears, scroll down and select New which will reveal a sub-menu. In this sub-menu select the Text Document option. This will create a new text document on your desktop. Rename the file whatever you like (we’ll be saving it as a different file later) and click anywhere on the desktop or press enter.
Now, click your newly created document to open it in Notepad. This is where you’ll need to tell your batch file shortcut which applications or files to open. The batch command to open a file is START. To have your batch file open a file or application, type START followed by a space, followed by the file or application you want it to open. Here is an example:
START C:Windows otepad.exe
This command will open Notepad in a new window. To have your batch file open multiple programs, hit enter and type a new START command on the next line. Note that, for most default Windows applications and applications which have been installed, you can simply type the file name, without specifying the directory in which the file is located as shown in the following example:
When you want the batch file to open a file that has spaces in the file name, you’ll need to put quotations around the file name as shown in the following example:
START C:AudioMusic”The Seatbelts – Rain.mp3″
The batch file will open non-application files with their default application. For the example above, the mp3 file would open with whatever music program is set to open mp3 files (Windows Media Player is the default).
If you want a file or application to start maximized, type /MAX after START and before the file name. Alternatively, if you want the file or application to be minimized upon opening, type /MIN after START and before the file name.
Let’s say you’re a student and you want a shortcut to open and maximize your internet browser for research, open Microsoft word to type a report, and open a music playlist with your favorite music to study to. Your batch file would contain text similar to this:
START /MAX Firefox.exe
START C:AudioPlaylists”Study Music.wpl”
When you’re finished, in order to save your batch file shortcut, click File on the Notepad tool bar, and select Save As. Save the file as Shortcut.bat. You can replace the word “shortcut” with whatever you’d like to name your shortcut, just make sure it has .bat at the end. The batch file shortcut should now be on your desktop and ready to launch whatever files and applications you’ve specified with a simple double click of the shotcut. You can edit the contents of the batch file at any time by right clicking the file and choosing Edit from the pop-up menu.