Folder creation from excel or text file

R

RFI.Kidney

Hello all,
I have an excel sheet with about 900 entries.I need to create a folder
in explorer for each name on the excel.

as an example the entries run like this


smith, john
rogers, david
wells, alan


I am trying to automate creating a folder for each entry and the folder
name will be the name of the entry in the excel.
thanks for your help.
I saw the post below on a search and tried it but it did not work for
me.(maybe i did not understand the directions)
Am using win xp pro.


_________________________________


Bulk creation of new folders.
All 2 messages in topic - view as tree
From: Richard Wright - view profile
Date: Fri, Jan 25 2002 10:23 am
Email: "Richard Wright" <[email protected]>
Groups: microsoft.public.win2000.file_system
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author


I would like to know if there is a way to automate this,
I have about 1,500 folders to create, the names of which
are already listed in Excel. All the new folders will be
attached to the same parent folder at least!
If anyone can knows a quick way, this would be fantastic!

Reply Rate this post:


From: GZiv - view profile
Date: Sun, Jan 27 2002 5:15 pm
Email: "GZiv" <[email protected]>
Groups: microsoft.public.win2000.file_system
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author


How about writing a little script in Excel's VBA using the
FileSystemObject
to do that.? Should be no more than a few lines of code
do you have any experience in that?

also, you can, instead, do this:


(suppose the list of names is on the first column, and the name of the
first
folder you want to create is Jack):
Make the second column cell in the row read "md x:\users" & "Jack"
now make all the second row cells the same,
then save the sheet to a batch file (with a ".cmd" or ".bat" extension)

go to the d: drive (assuming this is where you need to create the
directories
and run it.
It's that simple.



"Richard Wright" <[email protected]> wrote in message
 
P

Pegasus \(MVP\)

You could do this:
1. Make sure all your entries are in column A of your spreadsheet.
2. Edit/copy column A
3. Click Start / Run / notepad c:\folders.txt {OK}
4. Click Edit / paste. You now have a text file with all the folder names
inside.
5. Click Start / run / cmd {OK}
6. Type this test command:
for /F "tokens=*" %* in (c:\folders.txt) do @echo md "D:\My Folders\%*"
{Enter}

If you're happy with the result, make it happen by typing this command:
for /F "tokens=*" %* in (c:\folders.txt) do @md "D:\My Folders\%*"
{Enter}
 
D

Dave Patrick

You might try some of these.

http://www.google.com/search?hl=en&q=create+folders+from+excel

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Hello all,
| I have an excel sheet with about 900 entries.I need to create a folder
| in explorer for each name on the excel.
|
| as an example the entries run like this
|
|
| smith, john
| rogers, david
| wells, alan
|
|
| I am trying to automate creating a folder for each entry and the folder
| name will be the name of the entry in the excel.
| thanks for your help.
| I saw the post below on a search and tried it but it did not work for
| me.(maybe i did not understand the directions)
| Am using win xp pro.
|
|
| _________________________________
|
|
| Bulk creation of new folders.
| All 2 messages in topic - view as tree
| From: Richard Wright - view profile
| Date: Fri, Jan 25 2002 10:23 am
| Email: "Richard Wright" <[email protected]>
| Groups: microsoft.public.win2000.file_system
| Not yet ratedRating:
| show options
| Reply | Reply to Author | Forward | Print | Individual Message | Show
| original | Report Abuse | Find messages by this author
|
|
| I would like to know if there is a way to automate this,
| I have about 1,500 folders to create, the names of which
| are already listed in Excel. All the new folders will be
| attached to the same parent folder at least!
| If anyone can knows a quick way, this would be fantastic!
|
| Reply Rate this post:
|
|
| From: GZiv - view profile
| Date: Sun, Jan 27 2002 5:15 pm
| Email: "GZiv" <[email protected]>
| Groups: microsoft.public.win2000.file_system
| Not yet ratedRating:
| show options
| Reply | Reply to Author | Forward | Print | Individual Message | Show
| original | Report Abuse | Find messages by this author
|
|
| How about writing a little script in Excel's VBA using the
| FileSystemObject
| to do that.? Should be no more than a few lines of code
| do you have any experience in that?
|
| also, you can, instead, do this:
|
|
| (suppose the list of names is on the first column, and the name of the
| first
| folder you want to create is Jack):
| Make the second column cell in the row read "md x:\users" & "Jack"
| now make all the second row cells the same,
| then save the sheet to a batch file (with a ".cmd" or ".bat" extension)
|
| go to the d: drive (assuming this is where you need to create the
| directories
| and run it.
| It's that simple.
|
|
|
|
 
R

RFI.Kidney

Thanks Pegasus ! worked like a charm :)

You could do this:
1. Make sure all your entries are in column A of your spreadsheet.
2. Edit/copy column A
3. Click Start / Run / notepad c:\folders.txt {OK}
4. Click Edit / paste. You now have a text file with all the folder names
inside.
5. Click Start / run / cmd {OK}
6. Type this test command:
for /F "tokens=*" %* in (c:\folders.txt) do @echo md "D:\My Folders\%*"
{Enter}

If you're happy with the result, make it happen by typing this command:
for /F "tokens=*" %* in (c:\folders.txt) do @md "D:\My Folders\%*"
{Enter}
 

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

Top