kennysarmy (3rd July 2008)
I have a sequence of batch files / commands I run at the start of each year to set up the new intake.
These are:
ONE.
On server at command prompt type addusers /c d:\addusers\2008\newuser.csv
where newuser.csv has the following entries:
[User]
Usernam Surname Forename School Pupil
TWO.
Run pupils.bat
which has the following entries:
@call mkdir.bat 3357 33 3300 57
@call mkdir.bat 4453 44 4400 53
where mkdir.bat has the following entries:
mkdir D:\Users\%3\%4
net share %1$ /d
net share %1$=D:\Users\%3\%4 /users:5
echo y|cacls D:\Users\%3\%4 /t /c /g %1:c "CREATOR OWNER":f "Domain Admins":f Staff:c Administrators:f
net user %1 /HOMEDIR:\\FP2\%1$
net user %1 /SCRIPTPATHupils.bat
THREE
In AD add newly created pupils to pupils group highlight all new pupils, right click and choose Add members to group
Now, what I want to do is also create sub-folders in each user area created say for "ICT", "Maths", "DT" etc.
Any suggestions welcome
Thanks.
Just change
toCode:mkdir D:\Users\%3\%4
or (bit more flash :-))Code:mkdir D:\Users\%3\%4 mkdir D:\Users\%3\%4\maths mkdir D:\Users\%3\%4\ict mkdir D:\Users\%3\%4\design
Code:mkdir D:\Users\%3\%4 for %%i in (ict maths dt) do mkdir D:\Users\%3\%4\%%i
kennysarmy (3rd July 2008)
There are currently 1 users browsing this thread. (0 members and 1 guests)