Re: View all folders unchecked for "allow inheritable permissions"
<ryanlsanders@gmail.com> wrote in message
news:2a5dbc2e-65c4-4543-b80e-429d0025e0ce@p25g2000hsf.googlegroups.com...
>I need to pull a listing of all folders on a file server that has the
> "Allow inheritable permissions from parent to propagate to this
> object" check box cleared.
>
> Does anyone have any suggestions?
>
> Thanks!
Try this batch file:
01. @echo off
02. set Target=D:\User Files
03. set LogFile=c:\NoInherit.txt
04. rem Requires fileacl.exe, downloadable from
05. rem
http://www.microsoft.com/downloads/...ea-34f0-4e6d-9a72-004d35de4e64&displaylang=en
06.
07. echo Inheritance checked on %date% at %time% > "%LogFile%"
08. echo ==================================================== >> "%LogFile%"
09. echo.
10. echo Compiling the folder list . . .
11. dir /ad /b /s "%Target%" > "%temp%\dir.txt"
12. echo The following folders do not have inheritance set: >> "%LogFile%"
13. for /F "delims=" %%a in ('type "%temp%\dir.txt"') do call :Sub %%a
14. notepad "%LogFile%"
15. goto :eof
16.
17. :Sub
18. echo Checking "%*"
19. fileacl.exe "%*" /raw | find /i "
" > nul || echo %* >> "%LogFile%"