Batch Folder Creator: 8 Best to Use in 2023

Create Multiple Folders In a File Manager

There’s loads of free third party file management tools around that are more advanced than Windows Explorer. Some file managers have the ability to also create several folders at once.

5. FreeCommander XE

Creating multiple folders in FreeCommander XE is quite easy. Navigate to the root folder you want to start in then press F7 (or right click > New > Folder). In the new folder dialog, enter all the folder names separating each with a vertical line, also known as pipe (Shift+\).

Free commander multiple folders

Entering subfolder paths is accepted as well so you can also type something like:

MyMusic\Favs|Work|Play|Games\Downloads

FreeCommander XE has both portable and installer versions although the 64-bit version is for donators only. Do note that the XE version has this ability but not the older FreeCommander 2009.

Download FreeCommander XE


6. XYplorer Free

The discontinued but still useful XYplorer Free is a better choice when you want to create a lot of new folders at once. Go to the root folder where you want to start the folder creation and right click > New > New Folders. This opens up a window where you enter each folder with an optional subfolder on each new line.

Xyplorer create multiple folders

The advantage with XYplorer over similar free file managers is you can copy and paste whole folder lists into the window from text files or other applications.

Download XYplorer Free

Multi Commander is another free file manager that can batch create new folders although it requires a semicolon (;) instead of pipe (|) to separate names. Other free file managers like Q-Dir, Explorer++, and NexusFile don’t appear to have the create multiple folders ability.

7. Create Multiple Folders With Excel and a VBA Macro

Using a combination of Microsoft Excel and the Visual Basic for Applications (VBA) scripting language it’s a relatively simple task to take a list of folder names and create them in one move. All you need is Excel itself and the VBA macro script.

1. Download the VBA macro text file, open it in Notepad and copy the contents.

2. Launch Excel and load the workbook with the list of folder names. Press Alt+F11 to open the Visual Basic Editor.

3. Go to the Insert menu > Module. Right click in the new module window that’s opened up and paste in the VBA macro text. Close the Visual Basic Editor.

Excel paste script

4. To launch a macro press Alt+F8 or go to the View tab > Macros. There are two macro scripts available. Select which one you want to use and press Run.

Excel createdirs macros

The CreateDirs macro will read the root path to create the folders in cell A1 and then create the folders found in cells A2 onwards. For example cell A3 below will be C:\Users\Raymondcc\Desktop\Raymondcc\Blog and etc. Make sure to insert the path to create the folders into cell A1 or they will not be created in the correct location.

Excel createdirs

The CreateDirsFullPaths macro takes a list of folder names with each having its own full path. Cells A1 to A1000 will create a folder named with the exact path specified.

Excel createdirsfullpaths

5. To keep the workbook and the macro for future use save it as an “Excel Macro-Enabled workbook (*.XLSM)”. Depending on your Excel security settings you might have to accept a security warning to enable the macro when reloading the workbook.

If you need to create more than 1000 folders or use a different cell range, the VBA script can easily be edited to accommodate. You can also configure a keyboard shortcut in the Macro window options so the folders can be created by simply pressing a key Ctrl+[key] combination.

8. Use a Batch Script to Create Multiple Folders

Using a simple batch script to create a number of folders is very easy and doesn’t require special knowledge or external tools. All you have to do is create a text file with a list of all the folders and relative paths with the command MD at the start of each line. MD is the same as the mkdir command line tool and is used in the background of some third party folder creation tools.

Create an empty text file and simply add “MD ” then the relative path of each folder on a line.

Notepad md script

Save as a .BAT batch file and copy it to the root folder where the new folders are to be created, then run it. The full path to each folder can also be used so the script can be run from any location. Alternatively, insert a new line at the beginning of the batch and CD to the root folder, e.g. “cd D:\MyFiles”.


Create Multiple Subfolders Inside Multiple Folders

This option is quite useful if you have several base folders and want to create the same folder structure inside each one. For instance, you have 50 folders and want to place a “Work” folder and a “Downloads\Docs” folder in all of them.

Set folderspath=%~dp0
For /D %%F in (“%folderspath%\*”) do md “%%F\Work\” “%%F\Downloads\Docs\”

Copy the above text to your favorite text editor, edit the paths after the md command (leave %%F\ in there), and then save it as a .BAT file. Drop the batch file into the base folder and execute it.

Subfoldersinsidefolders

You can add or remove folder paths from the script, just make sure to leave a space between each path and use quotes to avoid issues. For ease of use, download the batch script from below and edit the paths yourself in a text editor. More advanced users can also filter in/out specific folders by editing the * wildcard portion of the script.

Download SubfoldersInsideFolders.bat Script


Create a Batch File From a Text File List

If you already have a list of folders in a text file, it’s possible to add the md command to each line automatically turning it into a batch file. You will need a text editor that has a replace option and accepts regular expressions. Windows Notepad can’t do this but others like Notepad++ and Notepad2 can. We’ll use Notepad++.

Notepad replace with md

Load the text file into the editor and go to Search > Replace (Ctrl+H). Select Regular expression as the search mode and for the find string, enter ^ (Shift+6). For the replace with string enter “md ” without quotes. Press Replace All and md will be inserted at the start of every line. Save the file as a .BAT and run it.

Tip: Don’t forget that folders with a space in the name have to be enclosed in quotes. Failure to do that will give you separate folders named after each word. If you have some spaced names in your text file and they aren’t quoted, the safest option is adding quotes to all folder names in the list.

Notepad replace with quotes

To do that use the same replace text window but add a quote to replace with (md “). Then perform a new replace using $ as the search string and a single quote (“) as the replace with. Make sure the regular expression option is enabled before you run the replace.

8 Comments - Write a Comment

  1. SilverAG 3 years ago
  2. Anoir Ben Tanfous 5 years ago
    • Freddy 5 years ago
    • Marius Munteanu 4 years ago
  3. roman 8 years ago
  4. Paul 13 years ago
  5. gpc111 13 years ago
  6. Zapped Sparky 13 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.