Results 1 to 3 of 3

Thread: How to create folders & sub folders from a Excel list

  1. #1
    Join Date
    Jan 2012
    Posts
    30

    How to create folders & sub folders from a Excel list

    I need to create folders with subfolders from a listing that I have in an excel document. Is there a macro that will do that for me instead of having to go to the browser and use Folder > New > Name. There are over a thousand subfolders that I need to create and don't want to do it manually. Thanks in advance to the gurus.

  2. #2
    Join Date
    Jun 2011
    Posts
    635

    Re: How to create folders & sub folders from a Excel list

    There is a small code that you can try out.
    Code:
    On Error Resume Next
    For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
    MkDir Cells(i,"A").Value
    Next i

  3. #3
    Join Date
    Jul 2011
    Posts
    640

    Re: How to create folders & sub folders from a Excel list

    I have had similar tasks to do, but not this exactly. I didn't use a macro, though. Instead, I made a DOS-style batch file using an extra column. For example, suppose column A holds sub-folders you want to create inside folder c:\whatever\. In B1, put ="MKDIR " & A1 and copy down for as many rows as you need.Select column B and Edit > Copy. Paste into a new Notepad window, and "save as" inside the folder c:\whatever\ with name "temp.bat" (include the quotes). Then open folder c:\whatever\ and double-click on temp.bat. Adapt or expand the example to suit your needs.

Similar Threads

  1. Replies: 7
    Last Post: 25-03-2012, 11:30 AM
  2. Replies: 3
    Last Post: 11-01-2012, 07:25 AM
  3. Live Mesh Folders on Desktop of other peers - can't move folders
    By Assasin boy in forum Windows Software
    Replies: 5
    Last Post: 12-08-2010, 01:05 AM
  4. Can create folders but cannot rename them
    By Jhonwho in forum Operating Systems
    Replies: 4
    Last Post: 28-04-2009, 11:33 AM
  5. Create Folders
    By AmdUser in forum Software Development
    Replies: 3
    Last Post: 23-03-2009, 01:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,726,972,957.04131 seconds with 17 queries