Jump to content

Recommended Posts

Posted

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?

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...