Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create multiple folders 2

Status
Not open for further replies.

beck1e

Instructor
Oct 23, 2006
14
GB
Hi I'm looking for ways to script the creation of personal folders for multiple users extracting information from a .csv or .txt file

Basically i want to create for each user a folder they can each access
i.e.
c:\home\username1
c:\home\username2
c:\home\username3

etc

I'm fairly certain this can be done but my scripting knowledge is limited.

Any help much appreciated

Thanks

Bex
 
Try the following;

1. Create a file called userlist.txt in the following format;
USER1
USER2
.
.
2. You can then create a batch file similar to this;
@echo off
for /F "delims==," %%i IN (userlist.txt) do md c:\home\%%i

Should work for you
 
That works great at creating folders and will save us a lot of time. Thanks for your swift reply.

Going to be a little cheeky though and try expand further on this now as it highlights other bits that time could be saved on.

Does anyone know how to script the creation of folders from a .txt or .csv file which would allow security rights to be submitted to the folder if the .csv included the users username along with the required filename?

Thanks

Bex

[ponytails]
 
You could create a similar batch file (or extend the existing one) by using the xcacls command. Type XCACLS /? at the prompt for more info
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top