Set folder permission in a batch file?

  • Thread starter Thread starter Kevin Brault
  • Start date Start date
K

Kevin Brault

Hello everyone,

How can I set folder permissions with a batch file on W2K and WXP?

Thanks
 
Kevin Brault said:
Hello everyone,

How can I set folder permissions with a batch file on W2K and WXP?

cacls will work or for more flexibility get subinacl from the resource kit.

see cacls /? and subinacl /? for details.
 
I like XCACLS.EXE from the NT or Windows 2000 Res kit.

To set the user permissions in a folder called F:\users

for /D %%I in (f:\users\*) do xcacls F:\USERS\%%I /T /E /G %%I:c

This assumes that the folder name equals the users name and that you
want to give them Modify permissions. If you do this from the command
prompt, use only one %. If it's in a batch file you need to use two %.

OldDog
 
Back
Top