日期:2014-05-17 浏览次数:20849 次
@echo off for /l %%i in (1,1,10) do ( echo 先建立用户 net user stu%%i 123 /add echo 再建立文件夹 md x:\stu%%i echo 再授权并建立共享 if %%i leq 5 ( cacls x:\stu%%i /g stu%%i:f,administrators:f net share stu%%i=x:\stu%%i /grant:stu%%i,read /grant:administrators,full /users:10 ) else ( cacls x:\stu%%i /g stu%%i:f,administrators:f net share stu%%i=x:\stu%%i /grant:stu%%i,full /grant:administrators,full /users:10 ) echo 最后建立用户档 echo stu%%i>x:\stu1\stu%%i.txt )