新建文件夹并设置权限:
md c:\test
>>%temp%\temp.txt echo y
cacls c:\test /t /p everyone:n <%temp%\temp.txt
删除文件夹权限与文件夹
>>%temp%\temp.txt echo y
cacls c:\test /t /p everyone:f <%temp%\temp.txt
rd/s/q c:\test
逐行读取V8.txt文件并创建文件夹与设置权限
>>%temp%\temp.txt echo y
set targe=''
setlocal enabledelayedexpansion
for /f %%i in (V8.txt) do (
md %%i
cacls %%i /t /p everyone:n <%temp%\temp.txt
)
逐行读取V8.txt文件并去除权限与删除文件夹
>%temp%\temp.txt echo y
set targe=''
setlocal enabledelayedexpansion
for /f %%i in (V8.txt) do (
cacls %%i /t /p everyone:f <%temp%\temp.txt
rd/s/q %%i
)