writing a batch script with ownership changes and cacls permission changes
Posted on 2004-10-02
The specific circumstance is I have a folder that is used to store completed documents in for all to read but none to change. First of all the user who creates these documents needs a way to transfer them into this folder.
Once that occurs I need to remove the change permissions from that user and anyone else who was carried over from the originating folder.
Hence the reason for this loop.
for %a in (*.*) do cacls %a /T /G "X\Domain Admins":F "X\Domain Users":R "X\QualityDocCtrl-Admin":R<yes.txt
I also tried to get around the issue of ownership by changin the owner on the top folder manusally and checking the box that says to do the same for subfolders.
This loop does not work in a batch program it errors out saying a problem with a.
suggestions for doing the loop and changing the owner are appreciated,
sirbounty contributed the original suggestion,