Create folders from an Excel sheet

October 30, 2008 · 1,336 Views · Filed Under Tips & Tricks 

Let’s say that you’re working on a project and you have an Excel sheet that contains 100 names. For part of your project, you need to create a folder for each of the names. If you don’t want to create a new folder and name it 100 times, I have a very simple solution for you.

In this example, we’re starting out with this:
create folders from excel

Step 1. Highlight the “A” column and select “Insert”.
Step 2. In the new “A” column type the letters “md” into the first row.

create folders from excel

Step 3. Save the Excel sheet as a CSV (Comma delimited) file.
Step 4. Right-click on the new .csv file and choose to open in Notepad.

It should look like this:
md,folder1
md,folder2
md,folder3
and so on…

Step 5. Click on “Edit” and then select “Replace…”.
Step 6. Replace every comma with a space.
Step 7. Save the file as “filename.bat” and change the file type to “All Files”.
(This makes the file executable.)
Step 8. Double-click on the new .bat file.

Note: The new folders will be created in the same directory that the .bat file is in. So, if you don’t want 100 folders on your desktop, don’t run the .bat file from the desktop.

Comments

8 Responses to “Create folders from an Excel sheet”

  1. admin on January 30th, 2009 12:06 pm

    I just used this technique again today.

  2. Batman on February 5th, 2009 9:58 am

    This is some batty good stuff!! – I’ll be sure to fly to this site on a regular basis and navigate through every single blue link often… ;)

  3. Danielle on February 25th, 2009 2:20 pm

    Some of my names have spaces in the title for example “John Doe.”
    How do I create a folder that reads “John Doe.”
    Right now I am only getting a folder named “John”

  4. admin on February 25th, 2009 4:24 pm

    If you put the folder name in quotes in your batch file, it will work.

    md “John Doe”
    md “Sally Jones”

  5. Danielle on February 27th, 2009 11:04 am

    Worked perfectly – thank you so much.

  6. idali on July 21st, 2009 2:09 pm

    good
    any idea about sub folder

  7. Rowan on October 5th, 2009 8:33 pm

    OMG whoever wrote this I love you so much!

  8. Sara on February 15th, 2010 6:31 am

    I wish I found this 2 hours ago – what a totally simple solution …. thank you so much!

Leave a Reply