Link to home
Start Free TrialLog in
Avatar of Joel Armstrong
Joel Armstrong

asked on

Add group with write permissions to the same folder with different paths

I want to add a security group and grant write permissions to the same folder in different user folders ex;

group name = copier

server.yo.local\users\janedoe\scans
server.yo.local\users\johndoe\scans
server.yo.local\users\Freddoe\scans

Is there an easy way to enum a list of folders and then add the group with appropriate permissions to the scans folder.
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joel Armstrong
Joel Armstrong

ASKER

Thanks for your help.   This was what I was looking for.  Between the two suggestions I cam up with the following line in a batch file that worked.

for /f %%a in ('dir \\server.yo.local\users\ /b') do icacls \\server.yo.local\users\%%a\scans /grant domain\copier:(OI)(CI)M
Glad to help. Have a nice day.