We have been using icacls to set permissions on a number of directories as we migrate sites between servers.
icacls archive /grant IUSR:(OI)(CI)M
icacls cp_audit /grant IUSR:(OI)(CI)M
icacls repository /grant IUSR:(OI)(CI)M
As we only need to set directory permissions we want to exclude files from the permission reports we can generate using;
icacls c:\inetpub\wwwroot\* /T > c:\temp\file.txt
We also want save the current folder permissions only to file
icacls c:\inetpub\wwwroot\* /save AclFile.txt /T
How can we use icacls to just report folders and not files?