Hi Folks,

Having a mass clear out this week. I want to be able to have a script at the root of the home directories that creates directories and sets permissions on the folder so that the students cannot delete them.

I have used the following code to create the structure in the home areas:

Code:
for /d %%x in (*) do mkdir "%%x\Year 7"
for /d %%x in (*) do mkdir "%%x\Year 7\Art"
for /d %%x in (*) do mkdir "%%x\Year 7\Beliefs and Values"
for /d %%x in (*) do mkdir "%%x\Year 7\Music"
for /d %%x in (*) do mkdir "%%x\Year 7\Technology"
for /d %%x in (*) do mkdir "%%x\Year 7\History"
for /d %%x in (*) do mkdir "%%x\Year 7\English"
for /d %%x in (*) do mkdir "%%x\Year 7\Drama"
for /d %%x in (*) do mkdir "%%x\Year 7\Media"
for /d %%x in (*) do mkdir "%%x\Year 7\PE"
for /d %%x in (*) do mkdir "%%x\Year 7\MFL"
for /d %%x in (*) do mkdir "%%x\Year 7\Geography"
for /d %%x in (*) do mkdir "%%x\Year 7\Science"
for /d %%x in (*) do mkdir "%%x\Year 7\Maths"
for /d %%x in (*) do mkdir "%%x\Year 7\ICT"
for /d %%x in (*) do mkdir "%%x\Whole School"
I was thinking of using SetACL.exe for permissions, but dont know how. Does anyone have any ideas as to what permission I would need to set.

Regards

Stuart