If you have a spreadsheet and want to create multiple folders from the Excel spreadsheet’s values, you can follow this tutorial. Whether you use the Excel desktop app, Excel Online, or Google Sheets, you can use this tutorial to get the same results.
Let’s assume that you have a list of names alongside some other data in an Excel spreadsheet. Meanwhile, you want to make folders after each name mentioned in a column. Instead of creating them manually, which is very time-consuming, you can use a simple method to create multiple folders at once from Excel cell values. As you already have the Notepad app on your computer, you do not need anything else to get the job done.
Before getting started, you should know a few things that must be cleared. Let’s say you have a spreadsheet containing three columns and five rows. If you follow this method, you will end up creating five folders, and each folder will contain two sub-folders. It is possible to add or remove more sub-folders, but that requires manual work.
We have shown the steps in a demo spreadsheet. In other words, we have mentioned Column A, B, and so on to simplify the steps. However, you need to do the same in a specific column/row/cell according to your spreadsheet. As per this following guide, Column B will be the primary folder, and Column C, D, etc., will be sub-folders.
How to create multiple folders at once from Excel
To create multiple folders at once from Excel, follow these steps-
- Open the Excel spreadsheet.
- Right-click on Column A and select the Insert option.
- Enter MD in all cells.
- Enter \ as a prefix in all cells except Column A and B.
- Select all cells and paste them into Notepad.
- Select space and \ combination visible before all the C, D, or rest of the columns.
- Go to Edit > Replace.
- Enter the copied content in the Find what box.
- Enter \ in the Replace with box.
- Click the Replace All button.
- Go to File > Save As.
- Select a path, enter a name with .bat extension, and click the Save button.
- Move the .bat file to a place where you want to create all folders.
- Double-click on it.
Let’s check out these steps in detail.
At first, open your Excel spreadsheet. However, it is recommended to make a copy of this sheet as you are going to make a few changes to the original spreadsheet.
After opening, you have to enter a new column in the beginning. For that, right-click on the existing Column A and select the Insert option.
Now, enter MD in all the cells in Column A.
Next, you have to enter ‘\’ as the prefix in all cells of Column C, D, and all the other columns that you want to include. For that, you can follow this detailed guide to enter prefixes in all cells in Excel.
Then, copy all the cells, open the Notepad app, and paste it there. You have to remove the space between Column B and C, and so forth. For that, copy the portion containing the space and \ > go to Edit > Replace, and paste it in the Find what box.
Enter \ in the Replace with box, and click the Replace All button.
Now, you can find the entries like this-
Click the File > Save As option, choose a path where you want to save the file, enter a name with .bat extension (for example, myfolders.bat), and click the Save button.
Now, move the .bat file to a location where you want to create all the folders and double-click on it. Depending upon how many cells you selected, it might take 10-15 seconds to get the job done.
That’s all! Do let us know if you have any doubt in the comments.