If you have different folders, with identical sub-folders, and wish to compare permissions on the folder and sub-folders, I have scripted CompPerms.bat.

NOTE: CompPerms.bat uses Xcacls freeware.

The syntax for using CompPerms.bat is:

CompPerms Source Target

where Source is the full path to the source folder and Target is the full path to the target folder.

CompPerms.bat produces a on-screen report of differences, using the Fc command.

CompPerms.bat contains:

@echo off                              setlocal                              if \{%1\}

\{\} goto syntax if not exist %1 goto syntax if \{%2\}

\{\} goto syntax if not exist %2 goto syntax set src=%1 set tgt=%2 set srcarg=%src:"=% set tgtarg=%tgt:"=% set works=%TEMP%\CompPermsSrc.tmp set works=%works:"=% set works="%works:\\=\%" set workt=%TEMP%\CompPermsTgt.tmp set workt=%workt:"=% set workt="%workt:\\=\%" @echo %srcarg%>%works% @echo %tgtarg%>%workt% call :source %src% for /f "Tokens=*" %%i in ('dir %src% /ad /b /s') do call :source "%%i" call :target %tgt% for /f "Tokens=*" %%i in ('dir %tgt% /ad /b /s') do call :target "%%i" sort %works% /O %works% sort %workt% /O %workt% fc /c /n %works% %workt% endlocal goto :EOF :syntax @echo Syntax: CompPerms Source Target endlocal goto :EOF :source set obj=%1 set obj=%obj:"=% for /f "Tokens=*" %%j in ('xcacls "%obj%"') do call :strips "%%j" goto :EOF :target set obj=%1 set obj=%obj:"=% for /f "Tokens=*" %%j in ('xcacls "%obj%"') do call :stript "%%j" goto :EOF :strips set line=%1 for /f "Tokens=*" %%k in ('@echo set line^=%%line:%obj%^=%%') do %%k set line=%line:" =% set line=%line: "=% set line=%line:"=% for /f "Tokens=*" %%m in ('@echo set sub^=%%obj:%srcarg%^=%%') do %%m if "%sub%"

"" set sub=@echo %sub% %line%>>%works% goto :EOF :stript set line=%1 for /f "Tokens=*" %%l in ('@echo set line^=%%line:%obj%^=%%') do %%l set line=%line:" =% set line=%line: "=% set line=%line:"=% for /f "Tokens=*" %%n in ('@echo set sub^=%%obj:%tgtarg%^=%%') do %%n if "%sub%"

"" set sub=@echo %sub% %line%>>%workt%
NOTE: See tip 0425.