Bulk folder command generator
Turn a folder-name list into ready-to-paste mkdir / md / New-Item commands for bash, Command Prompt or PowerShell, with an optional parent path, a folder-tree preview and validation of illegal names. Nothing is executed.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Comma, Chinese comma and semicolon also work. Only command text is generated — no folder is created.
Commands
One command per line, in list order — paste straight into a terminal.
Enter a folder list to generate commands
Folders: 0 · Duplicates: 0 · Max depth: 0 · Skipped: 0
Folder tree preview
Enter a folder list to generate commands
What this tool does
- Convert a batch of folder names (project templates, client folders) into commands you can paste into a terminal
- Check the folder tree first, or generate the right syntax for Windows Command Prompt and PowerShell
Example
Input
2024 reports archive/contracts
Output
mkdir -p -- '2024 reports' mkdir -p -- 'archive/contracts'
bash is the default target; names are quoted so spaces and non-ASCII characters work.
Frequently asked questions
Do the generated commands actually create folders?
No. The tool only prints command text: it never touches the filesystem and never executes anything. Copy the commands into your terminal — check the folder-tree preview first.
What differs between the three shells?
bash (macOS / Linux) uses `mkdir -p -- 'path'` and tolerates existing folders; Command Prompt uses `md "a\b"` with backslashes; PowerShell uses `New-Item -ItemType Directory -Force -Path 'path' | Out-Null`, which also creates missing parents. Single quotes in names are escaped per shell.
Which folder names are skipped?
Names containing < > : " | ? *, control characters, absolute paths (/abs, C:\path), a leading ~, or . / .. segments, empty segments, or a segment longer than 255 characters are reported and skipped. Duplicate names produce a single command and are counted under “Duplicates”. Strict mode turns any of these into an error instead of skipping.
How are the parent path and nested paths handled?
The parent path is joined in front of every folder using the slash style of the target shell, so /Users/me/work plus 资料/合同 becomes `mkdir -p -- '/Users/me/work/资料/合同'`. The parent itself must be an ordinary relative or absolute path; .., ~, doubled separators or illegal characters are rejected.
Keywords:batch create foldersmkdir generatordir-makeroffline