Yes, you can create folders from a text file in Windows without installing anything. Command Prompt and PowerShell can both read a list of names, one per line, and make a matching folder for each. Both are built into Windows, so no third-party tools are needed. [1] Learn more in Create Folders Automatically by Date in Windows.
The same approach works on Windows 10 and 11, since it relies only on built-in command-line tools. [1]
Imagine a class roster, or a project plan with entries like Design, Development, Testing and Deployment. Type those names into a text file once, run one command, and every folder appears in seconds instead of being made by hand. [1]
Before you run any batch command, create a test folder such as “TestFolders” so you can experiment without affecting your main files. [1]
What should you prepare before you start?
Preparation takes about two minutes: one plain text file, saved somewhere easy to find, and a decision about where the new folders should land.
Create the list in Notepad
Open Notepad and type one folder name per line. For a class schedule, that might be:
Math 101
Biology 200
English Composition
History 150
Save the file as folders.txt. Each line will become one folder, so keep each name on its own line and avoid extra commentary in the file. The command-based methods read this file line by line, which is why the one-name-per-line layout matters. [1]
Save it somewhere simple
The Desktop works well, because the path is short and easy to type. A path such as C:\Users\<YourUsername>\Desktop\folders.txt is the form the PowerShell example uses. [1] Documents is also fine, as long as you remember where you put the file.
Decide where the folders should go
Pick the destination folder first, for example Documents or a project folder you already created. The commands build the new folders in the location you are currently working in, not necessarily where the text file sits. [1] That is why the next steps begin by moving to the destination with cd.
If you want to experiment first, make an empty test folder and use it as the destination. A throwaway location lets you see the result without touching your real files. [1]
Do you need extra software?
No. Windows’ built-in utilities can create multiple folders without any third-party tools. [1] A freeware app called Text 2 Folders also exists, and it creates folders from the names listed in a text file. [2] It is optional, and the built-in methods in the next sections cover the same job. To go further, see How to Create a Folder Inside Multiple Folders in Windows.
How do you create the folders with Command Prompt?
Command Prompt can read your list and create every folder with one for /f line. Here is the sequence, starting from a saved folders.txt.
Press Windows+R, type
cmd, and press Enter to open Command Prompt. [1]Move to the folder where the new folders should appear. For example, to build them inside Documents, type:
cd C:\Users\<YourUsername>\Documents
Replace <YourUsername> with your Windows account name. cd changes the current location. [1]
Run the loop:
for /f "delims=" %a in (folders.txt) do mkdir "%a"
Here is what each part does. for /f reads the file line by line. "delims=" keeps each whole line together, so a name like Project A is not split at the space. %a holds the current line, and mkdir "%a" creates a folder with that name, with quotes protecting spaces. [1]
Open the destination in File Explorer. It should now list one new folder for each line in your file.
If folders.txt is not in the current folder
The command looks for folders.txt in the folder you are currently in. If you saved the list on the Desktop but moved to Documents, replace folders.txt with the full path, such as C:\Users\<YourUsername>\Desktop\folders.txt. That path goes inside the parentheses, and the folders are still created in your current location.
Safety notes
The command creates folders in whatever location Command Prompt is currently in, so read the prompt before you press Enter. If it shows the wrong path, run cd again first. The command only adds folders; it does not delete existing ones. [1]
How do you do it in PowerShell instead?
PowerShell reads your text file line by line and creates one folder per line with a single command. The steps are the same on Windows 10 and Windows 11, and the command below comes straight from a published walkthrough. [1]
Open PowerShell. On Windows 11 you can right-click the Start button and pick a Terminal or PowerShell entry; on Windows 10 you can search for PowerShell in the Start menu.
Move to the folder where you want the new folders to appear. Use
cdwith the path in quotation marks, for example:
cd "C:\Users\<YourUsername>\Documents"
Run the command that reads your list and creates the folders:
Get-Content "C:\Users\<YourUsername>\Desktop\folders.txt" | ForEach-Object {New-Item -ItemType Directory -Name $_}
Replace <YourUsername> with your own Windows user name, and change the path if your list is saved somewhere other than the Desktop.
What the command does
Get-Content reads the file and hands over each line as a separate item. ForEach-Object repeats the action for every line. New-Item -ItemType Directory -Name $_ creates a directory, and $_ stands for the current line, so each line becomes a folder name.
For example, if folders.txt contains Design, Development, Testing and Deployment on separate lines, you get four folders with those names inside the location you chose in step 2. Open that location in File Explorer and the new folders are listed.
Windows 10 and 11
The steps are identical on Windows 10 and Windows 11, since the cmdlets work the same way on both. Windows 10 is past or near the end of its support period, so if you are still on it, plan an upgrade to Windows 11 when your PC allows it.
Which text file mistakes cause problems?
Most problems come from a few small details in the list or in where you run the command. Here are the four to watch for.
Names with spaces
The quotation marks around %a in the batch command are what let names with spaces work. In for /f "delims=" %a in (folders.txt) do mkdir "%a", a line such as Project A becomes one folder called Project A. [1]
Without the quotes, mkdir treats each space as a separator. The same rule applies when you type names directly: separate folders with spaces, and wrap any name that contains a space in quotation marks, as in mkdir "Project A" "Project B" "Project C". [1]
Blank lines and stray spaces
Keep the list to one clean name per line. An empty line gives the command nothing sensible to turn into a folder, and a space left at the end of a line can end up as part of the name. Delete blank lines and trailing spaces in Notepad before you run anything.
Characters folders cannot contain
Windows does not allow certain characters in folder names, including \ / : * ? " < > |. A line like Q1: Budget or Notes/2025 will fail or not produce the folder you expect. Use a dash or underscore instead, such as Q1-Budget.
Wrong working directory or file path
The command runs in whatever folder Command Prompt is currently in, so the new folders appear there. Use cd first, for example cd C:\Users\<YourUsername>\Documents. [1]
If folders.txt is not in that folder, the command cannot find it. Either move the file into the current folder or give its full path. PowerShell works the same way, and its example uses the full path: Get-Content "C:\Users\<YourUsername>\Desktop\folders.txt". [1]
Common questions about creating folders from a list
Can I make folders without typing commands?
Yes. Text 2 Folders is a freeware app for Windows that creates folders from a text file. Once you run it, it creates all the folders using the names listed in the file. [2] It suits you if you would rather click than type, though the built-in commands cover the same job without installing anything.
Can I save this as a reusable script?
Yes. Put the commands in a .bat file, a plain text file saved with that extension. The source shows this example, which changes to a folder, creates three folders with mkdir, and then holds the window open with pause: [1]
@echo off
cd C:\Users\<YourUsername>\Documents
mkdir Folder1 Folder2 Folder3
pause
The pause line keeps the window open until you press a key, so you can read any message before it closes. To reuse the idea with your list, swap the mkdir line for the for /f command from the Command Prompt steps. [1]
Can I make nested folders from the list?
The sources show only flat lists, where each line becomes one folder inside the current location. The for /f and Get-Content examples create every folder directly in the folder you are in. [1] If you need subfolders, the cleanest approach is to run the list once in each parent folder, changing to that location first with cd. Another route is to use a separate run for each level, with one text file per level.
Can I create hundreds of folders this way?
Yes. The source shows a PowerShell example that creates 100 numbered folders, Folder1 through Folder100, in one line: [1]
1..100 | ForEach-Object {New-Item -ItemType Directory -Name "Folder$_"}
The 1..100 part counts from 1 to 100, and "Folder$_" adds each number to the name.
Wrapping up your folder list
The whole method comes down to one idea: read each line of your list and make a folder from it, using for /f in Command Prompt or Get-Content in PowerShell. [1] Pick whichever shell feels more comfortable, since both do the same job.
Before you run anything on a real project, confirm you are in the right location and that your list looks clean. Then try a small list of three or four names in a test folder, such as one called TestFolders. [1] Once that works, swap in your full list and run it again.
