goaliepride (31st October 2008)
Hey all,
So I had an interesting problem, we have drives for students, drives for teachers, but no way of mixing the two so that students can turn in work. It's a pain to figure out how to have students drop things in a shared folder where they can see their own work but not their classmates. I finally figured it out, if anyone wants it let me know. My setup requires manual folder creation (each teacher gets a folder, and kids could drop files in the wrong teachers folder, sadly) My question is...
is there a way to script folder creation with permissions?
use the MD command to create folders and the CACLS or the XCACLS resource kit utility to set the permissions.
goaliepride (31st October 2008)
Thanks! That worked wonderfully. I used xcacls.vbs with autoit to do the looping and reading in the teachers names.
$script = "\\losaldeploy01\Shares\Scripts\xcacls.vbs"
$folder = "\\oakfp02\OAK-Students\StudentTurnIn\"
$file= FileOpen($folder & "\TeachersToCreate.txt", 0)
$options = "/E /F /S /T /G LOSAL\OAK_STUDENTS:2;2 /D LOSAL\OAK_STUDENTS:6;6 /I COPY"
$name = FileReadLine($file)
While $name <> ""
DirCreate( $folder&$name)
RunWait(@COMSPEC & " /c " & $script & " " & $folder & $name & " " & $options)
$name = FileReadLine($file)
Wend
There are currently 1 users browsing this thread. (0 members and 1 guests)