Windows batch files: open project files with one click
Windows

Windows batch files: open project files with one click

by HubSite 365 about Andy Park

This channel is about productivity and project management. New videos will be uploaded weekly, so check back regularly!

Create a Windows batch file that opens local files, cloud Office documents, and web pages for a project with one double-click.

Key insights

  • A .bat file can launch local file paths, cloud links, web pages, and apps from one double-click.
  • Use start "" "target" for each item and add timeout /t 2 /nobreak between launches.
  • Prefixes such as ms-word:ofe|u| and ms-excel:ofe|u| can route cloud Office links to desktop apps.
  • Without an Office URI prefix, a cloud document link can open in the web version or browser.
  • If a referenced file is moved or renamed, update its path or link in the batch file.

A Windows batch file can open the local files, cloud-hosted Office documents, and web pages you need for a project with one double-click. It can help people who prepare the same files before recurring meetings or switch between active projects. Andy Park demonstrates how to build and edit this kind of launcher in a YouTube video.

What it does

A batch file is a plain-text script saved with a .bat extension; Windows runs its commands when you open it. In this workflow, each command starts one target, which can be a local file path or a link. The launcher brings those targets together in one place without requiring you to browse through separate folders, cloud locations, or app-specific pinned lists.

For cloud-hosted Word, Excel, and PowerPoint files, an optional URI prefix can ask Windows to open the document in its corresponding desktop app. The prefixes in the provided template are , , and . A link without a prefix can instead open in the web version or browser.

Who it is for and what you need

This approach is for Windows users who repeatedly open a known set of project or meeting resources. The example combines a PowerPoint file stored on the computer with Word and Excel documents stored in OneDrive, then adds a web page. The files do not have to live in one folder or one storage location: the script contains a separate path or link for each target.

You can make the script in Notepad and save it with a .bat extension. To add local files, use File Explorer’s Copy as path command or the Ctrl+Shift+C shortcut shown in the demonstration. For cloud files, copy the file’s sharing link. You can also ask an AI tool to generate the batch-file text from your list of paths and links, then review it before saving and running it.

How it works

  1. Open Notepad and start with . This is the beginning of the template shown in the description.
  2. Add a start command for each item, using the form . Leave the first pair of quotation marks empty and put the file path or link inside the second pair.
  3. For a cloud Office document that should open in its desktop app, place the matching URI prefix directly before its HTTPS link. For example, put immediately before an Excel link. Leave the prefix off if you want to use the web version or browser.
  4. Optionally add between launch commands to introduce a two-second delay. Repeat the start command and, if desired, the delay for each additional file, app, or web page.
  5. Finish the script with , then save it as a .bat file. If you created a text document first, rename its extension from .txt to .bat and accept the Windows confirmation prompt.
  6. Double-click the .bat file to launch the listed targets. Keep the launcher somewhere easy to reach, such as a folder on the desktop.

To update the launcher later, right-click the .bat file and edit it in Notepad. Add or replace a target inside the second set of quotation marks. The same pattern works for a local path, an Office link, or an ordinary web address; only the Office link needs a prefix to request the desktop app.

Limitations and alternatives

The launcher relies on the paths and links it contains. If you move or rename a referenced file, update its entry in the .bat file; otherwise, the launcher will not find it. Treat the script as a list of references, not as a copy of the documents themselves.

There are simpler manual workarounds, but each has tradeoffs: browser bookmarks cover cloud links, app pins keep files within individual apps, and a OneNote page still requires opening links one at a time. The batch file groups mixed locations and types in a single launcher. Before using it for a changed project, check that each target is still the right file and that its link or path is current.

AI can draft the commands from a list of resources, but the script still needs to be saved as a .bat file if the tool only returns text. The prompt described by Park asks for a start command per target, two-second delays, and the relevant Office prefixes. Check the generated paths, links, and prefixes before running the result.

Sources

Frequently asked questions

How do I create a Windows batch file to open multiple files?

In Notepad, add a start "" "target" command for each file or link, then save the text file with a .bat extension. Double-click the .bat file to launch its targets.

How can I open a OneDrive Office link in the desktop app?

Place the matching URI prefix directly before the HTTPS link: ms-word:ofe|u| for Word, ms-excel:ofe|u| for Excel, or ms-powerpoint:ofe|u| for PowerPoint.

What happens if I move a file referenced in a batch file?

The launcher will not find a moved or renamed file through its old reference. Edit the batch file and update that path or link.