To compare the permissions on two directory structures with similar contents:

icacls path\to\folder1\*. /t > perms1.txt
icacls path\to\folder2\*. /t > perms2.txt

This assumes that folder1 and folder2 have a similar folder structure, but
maybe different file contents, e.g. if folder2 is an older copy of folder1
restored from backups.

The idiom "*." matches file/folder names that do not contain a dot, unless it
is a leading dot. (e.g. a folder named ".git" will be matched, a folder named
"dirname.ext" will not be matched, a file named "filewithnoext" will be
matched.)

So, it's not perfect, but in most cases it will get most of the folders and
exclude most of the files.