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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating User Folders in Windows 2000 Server

Status
Not open for further replies.

NinjaBeaver

IS-IT--Management
Dec 16, 2002
10
GB
Hi,

I'm a ICT Manager at a local school and have to add about 150+ kids per year as our new intake. Is there a quick way of creating 150+ user folders onto the D: drive or do I have to do it manually. Active Directory and the other piece of software does not seem to be able to create the folders automatically.

I have a CSV file with the student user names ready to go.

Please help and stop me from suffering from RSI.

Many thanks,

Simon Anderson.
 
Sound like a job for the FOR command.

Given a text file, list.txt, that contains:

one
two
three


Run from the command prompt:

for /f %a in (list.txt) do md %a


You'll create the directories one, two, and three in the current directory. You can do a similar thing with the xcacls reskit utility to set permissions on them.




 
Hi,

Thanks xmsre. I also had a brainwave over the weekend. I made a spread sheet with two columns. Column 'A' had the 'md' command all the way down to the bottom of column 'B' which had the UserNames in it.

E.G.

MD Student1
MD Student2
MD Student3

etc etc.

I then save this as a .CSV file. Rename the .csv file to .txt and edit with notepad and reaplce all the commas with spaces and save the file as a .bat. Move this file to where users folder is kept and run it. Hey presto 150 new user folders.

Thanks for you help

Simon Anderson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top