how to create multiple folders at once
You can create multiple folders at once using built‑in tools like Command Prompt, PowerShell, Finder/Terminal, or batch files, so you don’t have to click “New folder” over and over.
How to Create Multiple Folders at Once
1. Windows: Command Prompt (simple names)
Use this when you just want several folders in one place.
- Open the folder where you want the new folders.
- Click in the address bar, type
cmd, and press Enter (Command Prompt opens at that location).
-
Type a command like:
cmd md ProjectA ProjectB ProjectC -
Press Enter – all those folders appear at once.
You can list any folder names you want after md, separated by spaces.
2. Windows: PowerShell (more flexible)
PowerShell is great when you have a list of names.
- In the folder where you want the folders, Shift + right‑click in empty space and choose “Open PowerShell window here” (or “Open in Terminal”).
-
If you want to type folder names manually:
powershell "ClientA","ClientB","ClientC" | %{ New-Item -Name "$_" -ItemType "Directory" }
This creates one folder for each name in the quotes.
-
If you have a text file with folder names (one name per line), say
names.txt:powershell Get-Content .\names.txt | %{ New-Item -Name "$_" -ItemType "Directory" }
PowerShell shines when you’ve copied names from Excel, a CSV, or another list.
3. Windows: Batch file + Excel (hundreds of folders)
If you need a lot of folders (months, countries, students, etc.), a small batch file is efficient.
Step A – Prepare names in Excel
- Put all desired folder names in column A, one per row (e.g.,
Jan,Feb,Mar…).
-
In column B, generate
mdcommands with a formula like:text ="MD " & """" & A1 & """"
Copy this down the column so every row becomes a complete MD line.
Now column B will look like:
cmd
MD "Jan"
MD "Feb"
MD "Mar"
Step B – Create the batch file
- Copy the entire command column.
- Paste into Notepad.
- Save as something like
CreateFolders.bat.- In the “Save as type” dropdown, choose “All Files”.
- Make sure the filename ends with
.bat.
- Save it in the folder where you want to create all the folders.
- Double‑click the
.batfile – all folders are created instantly.
This method avoids typing complex commands by hand and works well with long lists from other systems.
4. Linux / macOS: Terminal tricks
On Linux or macOS, the idea is similar, but you use mkdir in Terminal.
Basic multiple folders
bash
mkdir FolderA FolderB FolderC
This creates three folders in the current directory, one for each name.
With a list in a text file
If you have a file names.txt with one folder name per line:
bash
while read name; do mkdir "$name"; done < names.txt
This will create one folder for every line in that file, preserving spaces in names.
5. Mini tips, ideas, and “gotchas”
- Use quotes for names with spaces, e.g.,
md "Invoices 2026" "Invoices 2027".
-
Test with 2–3 folders first to ensure you’re in the correct directory.
-
For nested structures, you can create a path like:
bash mkdir -p "Clients/ClientA/Invoices"
on macOS/Linux, or:
cmd
md Clients\ClientA\Invoices
on Windows.
A practical example: a teacher organizing student submissions can paste all
student names into Excel, generate MD commands, save as a batch file, and
instantly get one folder per student instead of manually creating dozens of
folders.
TL;DR:
- Quick manual set: use
md(Windows) ormkdir(Linux/macOS) with several names.
- Large lists: generate
MDlines from Excel or a text file and run them via batch file (Windows) or a simple loop in Terminal (Linux/macOS).
Information gathered from public forums or data available on the internet and portrayed here.