Quickly Automate App/File Opening

Photo of multiple computer monitors

If you’re finding yourself opening the same applications and files every time you boot up your Windows PC or have a specific task to work on, automating this process might save you a significant amount of time and hassle in the long term. One reasonably easy way to automate a process like this is by creating and running “batch” programs. A batch program (which can also be called an automation script) is simply a list of commands, created in Notepad (or any basic text editor) and saved with the “.bat” filename. When you then double-click this .bat file to run it, these commands are executed.

To build a batch program which opens a list of applications and files, open Notepad and type your needed commands, each on a separate line:

  • Your first line should be: “@echo off” (without the quotation marks). This prevents the command prompt windows from displaying when you run the batch file.

Applications

  • To open Notepad and Calculator, add in:
    start notepad.exe
    start calc.exe

  • If you are finding that this isn’t working to open the specific apps you need, you can try listing out the complete programme path, for example (including quotation marks):
    start "" "C:\Program Files\Google\Chrome\Application\chrome.exe"

 

Files

  • An example command to open a specific file (make sure you include the quotation marks) is:
    start "" "C:\Users\YourUsername\Documents\example.docx"

  • The first set of empty quotation marks is where you would put any specialised commands for opening the specific file (or running an application).

 

Internet Browser Tabs

  • If you want to open your preferred internet browser with specific websites ready to go, you can use:
    start chrome "https://www.google.com" "https://www.dropbox.com/"

  • This will open Google and Dropbox in separate tabs in Chrome.

 

Once you have all your commands ready to go, hit File > Save As and make sure you type “.bat” at the end of the file name. For example: “MyFirstBatchFile.bat”

To run the batch program, simply double-click it! If you need to edit the commands in the batch script after you’ve saved it, right click the file and choose “Edit in Notepad”.

Below is an example of the list of commands in a complete batch program. Feel free to simply copy-paste these lines into your own batch file and add to and edit as needed!

@echo off
start notepad.exe
start calc.exe
start chrome.exe "https://www.google.com" "https://www.dropbox.com/"
start "" "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"

Previous
Previous

Alt Codes: Hidden Character Shortcuts