In Windows, you can create a simple batch script file to open multiple folders at once with a double-click or keyboard shortcut. Here’re the exact steps.
You can easily open the file explorer window using the Win + E keyboard shortcut and navigate to the folder you want to open. Alternatively, you can pin frequently used folders to the taskbar. However, if you are constantly opening multiple directories, it is better to create a batch script to open folders at once. This reduces the repetitive work. For instance, every morning as soon as I start the system, I open three folders as part of my workflow. Though not a big deal, it is still a tedious job. So, I created a simple batch file that I execute as needed to open all folders at once.
In this quick and easy guide, let me share the steps to create a batch file to open multiple folders at once in Windows 10.
How to Create Batch File to Open Multiple Folders At Once
To open multiple folders at once, create the batch file using the script given below. Once created, double-click on the batch file to open the folders. Here’re the exact steps you should follow.
- First, go to the desktop in Windows 10.
- Right-click on the desktop.
- Select the “New → Text Document” option from the right-click menu.
- Name the text file as “OpenFolders.bat“. Make sure you replace the .txt extension with .bat.
- After creating the bat file, right-click on it and select “Edit“.
- The bat file will be opened in the Notepad. Here paste the below code in it. Replace the dummy folder paths with the actual folder paths.
@echo off start %SystemRoot%\explorer.exe "E:\dummy\path\to\folder1" start %SystemRoot%\explorer.exe "E:\dummy\path\to\folder2" start %SystemRoot%\explorer.exe "E:\dummy\path\to\folder3"
- To add more folders, duplicate the start line and add the folder path.
- Press “Ctrl + S” or select “File → Save” to save the batch file.
- Close the Notepad window.
That is all. Whenever you want to open different folders at once, simply double-click on the batch file. It will open all the folders for you.
Add Keyboard Shortcut to Run Batch File
To make things a bit easier, you can add a keyboard shortcut to run the batch file. That way, you don’t have to specifically go to the desktop and click on the batch file. Pressing the keyboard shortcut from anywhere will execute the batch script to open the folders. To add the keybinding, we going to use the AutoHotKey.
- First, install AutoHotKey.
- Next, create a text file on the desktop and name it “OpenFolders.ahk”. It is important that you replace .txt with .ahk.
- Right-click on the file and select “Edit Script”.
- Copy and paste the below code in the opened file. Change the dummy path with the actual path of the batch file.
;Press Alt + R !R:: Run, "C:\Users\Username\Desktop\OpenFolders.bat" return
- Save the file with Ctrl + S shortcut.
- Close the Notepad.
- Double-click on the .ahk file you just created.
That is all. From now on, whenever you want to open different folders at once, press the Alt + R keyboard shortcut. If you want to, you can customize the keyboard shortcut. Take a look at the AutoHotKey documentation to know how to set the key combinations.
I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible.