Looking to auto-create folders in Windows 10 / 11 using excel data and a simple script?
Keep reading, I’ll teach you how to get the script formatted with one formula in Microsoft Excel or Google Sheets to combine mixed strings of data into a single column. From there, you’ll copy the combined string into a file and run it with hundreds of folders created in seconds!
Format excel with two columns. #
|Name of Folders||Formula|
|Last, FirstName||=concatenate(“MD” “,”,A2)|
Copy down that formula throughout your sheet to get the formatting for the number of folders you need. In my case, it was 569…
You want to end up with this format (I added the numbers to help signal different names, this won’t “happen” to you):
MD "Last, FirstName0" MD "Last, FirstName1"
Create the Script #
Now, copy that formula column, with the above formatted text and past (Ctrl + Shift + V) without formatting into a text document (notepad).
Save the Script #
Save that notepad file as FileName.CMD (Must be saved in CMD format to work) and save it to the file location that you want the folders to be created in.
For example: if you want 569 desktop folders to be created on your desktop, save them as the file name – on your desktop.
Run the Script #
Now, you’re ready to run the file. Double-click the FileName.CMD file and let the script execute!
Done! File created. If there’s a duplicate file, you’ll see it error out in a terminal window, but the other files should be created. IF NOT, just remove those names from the CMD file and you’re good to keep processing.