Creating folders and subfolders from excel file list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.

Allie :-)
 
On Error Resume Next
For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
MkDir Cells(i,"A").Value
Next i

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
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.

I've 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.

For more on the command language, a good reference is
http://home7.inet.tele.dk/batfiles/msdos7/
 
BEAUTIFUL!!!! Thanks, works like a charm!

Jay said:
I've 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.

For more on the command language, a good reference is
http://home7.inet.tele.dk/batfiles/msdos7/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top