Over 10 years we help companies reach their financial and branding goals. Maxbizz is a values-driven consulting agency dedicated.

Gallery

Contact

+1-800-456-478-23

411 University St, Seattle

How to Create Multiple Folders in File Explorer

Creating a large number of folders one at a time is slow and boring. Excel can turn a simple list of names into a Windows batch script that makes those folders instantly. This method is fast, reliable, and very easy to adapt — trust me, it will save you time.

What You Need?

  • Microsoft Excel (or any spreadsheet that can export plain text)
  • Notepad (or any plain-text editor)
  • A target folder in File Explorer where the new folders should be created

How It Works?

Windows supports a simple command to create directories: MD (short for Make Directory). If you build a text file with one MD command per line and save it with a .bat extension, double-clicking that file runs each command and creates every folder listed.

Step-by-Step Guide

  1. Prepare a list of folder names in Excel (one per row). Put them all in a single column, for example column A.
  2. Create the MD command for each name. You have two options:
    • Manual: insert a new column to the left and type MD in the first cell, then fill down. Make sure the MD column appears before the name column so the output order is MD then the folder name.
    • Formula (recommended): in a new column use a formula that combines the command and the name, for example:
      = "MD " & A2

      Fill down the formula to produce a full MD command for every row.
  3. Copy the column that contains the completed MD commands (not the original names) and paste into Notepad.
  4. In Notepad, save the file into the folder where you want those folders created. Use File > Save As, choose the target folder, and give the file a name with a .bat extension (for example, create-folders.bat).
  5. Close Notepad, then open File Explorer and double-click the newly saved .bat file. The commands will execute and the folders will be created immediately.

Example .bat Content

Here’s what the contents of the batch file will look like (each line creates one folder):

MD Client A
MD Client B
MD "Client C Ltd"

Handling Folder Names with Spaces

If a folder name contains spaces, wrap it in quotes so the command treats the entire name as one argument (see the third line above). You can make Excel add quotes automatically with this formula:

= "MD """ & A2 & """"

This outputs: MD "Client Name"

Tips, Caveats, and Troubleshooting

  • Save in the correct folder: Save the .bat file to the exact directory where you want the new folders to appear. The batch runs relative to its location.
  • Check the text: Open the .bat file in Notepad to verify the commands before running — a quick glance prevents surprises.
  • Permissions: If creating folders in a protected location, you may need administrator permissions.
  • Undo: If you make a mistake, you can delete the created folders from File Explorer. The .bat file itself does not automatically delete anything.
  • Special characters: Avoid characters Windows does not allow in folder names (for example: \ / : * ? ” < > | ). If your source data might contain these, clean or validate it in Excel first.

Advanced: Creating Subfolders and Nested Structure

You can create nested folders with a single MD command by using backslashes to define the path. Examples:

MD "Client A\Project 1"
MD "Client A\Project 2\Drafts"

Excel can build these strings the same way you built single-folder commands. Example formula for a parent folder in A2 and child folder in B2:

= "MD """ & A2 & "\" & B2 & """"

Why this is Useful?

This approach turns repetitive folder creation into a one-click task. It is especially helpful for:

  • Onboarding clients or projects where each needs the same folder structure
  • Batch organising files for accounting, sales, or archives
  • Quickly generating templates of folder trees for teams

Discover more insightful blogs and resources at Avana Solutions

Related Post