How to Create Folders in Bulk from Excel List? (4 Easy Methods)
Managing hundreds of folders manually in Microsoft Windows can quickly become time-consuming. Many professionals working with Excel spreadsheets, data records, project files, or document management systems often need to create multiple folders at once.
Instead of manually creating each directory, you can use Microsoft Excel to generate folder names and then automate the process.
In this guide, we will explain step-by-step methods to create folders in bulk using an Excel list in a simple and efficient way.
Preparing Your Excel List for Folder Creation
Before generating folders, you first need a clean list of folder names in Excel.
Step 1: Create a Folder Name Column
Open Microsoft Excel and enter the names you want for the folders.
Example:
| Folder Name |
|---|
| Client_A |
| Client_B |
| Client_C |
| Client_D |
Each row will represent one folder.
Step 2: Clean Folder Names
Make sure your folder names do not contain invalid Windows characters such as:
- \ / : * ? ” < > |
These characters are not allowed in Windows file system directories.
Step 3: Save the Workbook
Save your Excel file as a normal .xlsx file or export it as CSV if needed.
Now you are ready to convert this list into commands that create folders automatically.
Method 1: Create Bulk Folders Using Excel Formula and Batch File
This is one of the easiest ways to create folders in bulk using Excel.
Step 1: Add the MKDIR Formula
In the next column, generate a command using this formula:
="mkdir """ & A2 & """"If your folder names are in column A, Excel will generate commands like:
mkdir "Client_A"
mkdir "Client_B"
mkdir "Client_C"Step 2: Drag the Formula Down
Drag the formula to apply it to all rows.
Example result:
| Folder Name | Command |
|---|---|
| Client_A | mkdir “Client_A” |
| Client_B | mkdir “Client_B” |
| Client_C | mkdir “Client_C” |
Step 3: Copy Commands to Notepad
- Copy the entire Command column
- Paste it into Notepad
Step 4: Save as a Batch File
Save the file with a .bat extension, for example:
createfolders.batMake sure the Save as type is set to All Files.
Step 5: Run the Batch Script
Place the batch file in the folder where you want the directories created.
Double-click the file. The Windows Command Prompt will execute the commands and instantly create all folders.
Method 2: Create Bulk Folders Using Command Prompt and Excel
This method uses Excel to generate folder creation commands and then runs them directly in Windows Command Prompt. You do not need to manually add the mkdir command for every folder.
Step 1: Prepare the Folder List in Excel
Enter all folder names in a column.
Example:
| Folder Name |
|---|
| Invoice_001 |
| Invoice_002 |
| Invoice_003 |
| Invoice_004 |
Each row represents a folder that will be created.
Step 2: Generate Commands Automatically in Excel
In the next column, enter this formula:
="mkdir " & A2
Excel will automatically generate the commands.
Example output:
| Folder Name | Command |
|---|---|
| Invoice_001 | mkdir Invoice_001 |
| Invoice_002 | mkdir Invoice_002 |
| Invoice_003 | mkdir Invoice_003 |
| Invoice_004 | mkdir Invoice_004 |
Drag the formula down to apply it to the entire list.
Step 3: Copy the Commands
Select the entire Command column and copy it.
Step 4: Open Command Prompt
Open Command Prompt and navigate to the location where you want the folders created.
Example:
cd C:\Users\Documents\Invoices
This command sets the working directory.
Step 5: Paste and Execute
Paste the copied commands into the Command Prompt window and press Enter.
Windows will instantly create all the folders listed in your Excel spreadsheet.
Example Result
If your Excel sheet contains:
| Folder Name |
|---|
| Client_A |
| Client_B |
| Client_C |
The following folders will be created automatically:
Client_A
Client_B
Client_C
inside the selected directory.
Method 3: Create Nested Folders from an Excel List
Sometimes you need multiple levels of folders, such as project and subproject directories.
Example Excel data:
| Project | Subfolder |
|---|---|
| Project_A | Reports |
| Project_A | Images |
| Project_B | Documents |
| Project_B | Data |
You can generate nested folder commands using this formula:
="mkdir """ & A2 & "\" & B2 & """"Excel output:
mkdir "Project_A\Reports"
mkdir "Project_A\Images"
mkdir "Project_B\Documents"
mkdir "Project_B\Data"When executed through a batch script, Windows will automatically create both the main folder and its subfolder.
Method 4: Create Folders from Excel Using PowerShell
For users comfortable with Windows PowerShell, automation becomes even easier.
Step 1: Export Folder Names
Copy your folder list from Excel and save it as folders.txt.
Example content:
Client1
Client2
Client3Step 2: Use PowerShell Script
Open PowerShell and run:
Get-Content folders.txt | ForEach-Object {New-Item -ItemType Directory -Name $_}PowerShell will read each line and create a folder automatically.
Advantages of PowerShell
| Feature | Benefit |
|---|---|
| Faster automation | Handles thousands of folders easily |
| Script automation | Can be reused for other projects |
| Supports complex folder structures | Works well with nested directories |
This method is commonly used in IT administration and system management.
Troubleshooting Common Issues
Sometimes users encounter problems while creating folders from Excel commands.
1. Folder Not Created
Possible causes include:
- Invalid characters in folder names
- Incorrect batch file extension
- Running script in wrong directory
2. Commands Not Executing
Ensure the file is saved as:
filename.batNot:
filename.bat.txt3. Permission Issues
If the script cannot create folders, run Command Prompt as Administrator.
FAQs
Can I create multiple folders at once using an Excel list?
Yes. You can create multiple folders at once by listing folder names in Microsoft Excel and generating commands such as mkdir using an Excel formula. These commands can then be executed through a batch file, Command Prompt, or PowerShell to automatically create all folders in seconds.
What is the easiest way to create folders in bulk from Excel?
The easiest method is to create a column in Excel that generates the mkdir command using a formula like = “mkdir ” & A2. After generating the commands, copy them into a .bat batch file or paste them directly into Command Prompt to create all folders automatically.
Can I create nested folders using an Excel spreadsheet?
Yes. Excel can generate commands that include multiple folder levels. For example, a formula can combine two columns to create commands like mkdir Project_A\Reports. When executed, Windows will create both the main folder and the subfolder automatically.
Does this method work in all versions of Windows?
Yes. The mkdir command works in most modern Windows versions including Windows 10, Windows 11, and Windows Server. Since the command is part of the Windows command line tools, it can be executed through both Command Prompt and PowerShell.
What characters should be avoided in Excel folder names?
Windows does not allow certain characters in folder names. Avoid using \ / : * ? ” < > |. If these characters appear in your Excel list, the folder creation command may fail.
How many folders can be created at once using Excel?
You can create hundreds or even thousands of folders at once using an Excel-generated command list. As long as the commands are valid and your system has permission to create directories, Windows Command Prompt or PowerShell can process very large folder lists quickly.

Vaishvi Desai is the founder of Excelsamurai and a passionate Excel enthusiast with years of experience in data analysis and spreadsheet management. With a mission to help others harness the power of Excel, Vaishvi shares her expertise through concise, easy-to-follow tutorials on shortcuts, formulas, Pivot Tables, and VBA.
