icacls batch file multiple directories with wildcards help needed
- by user153521
I have written the following batch file that does a great job combing through all folders beginning with the number 3 and applying folder permissions to any 2010 subfolder. Example of the batch filesis below:
for /D %%f in (D:\Data\3*) do icacls "%%f\2010" /inheritance:r /grant:r "Domain Admins":(OI)(CI)F
Question : How can I improve this script to allow for me to apply the permissions to a specific folder below ANY folder within the folders beginning with 3?
here is an example of my failed attempt:
for /D %%f in (D:\Data\3*) do icacls "%%f*\specificfolder" /inheritance:r /grant:r "Domain Admins":(OI)(CI)F