Set folder permission in a batch file?

K

Kevin Brault

Hello everyone,

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

Thanks
 
P

Paul R. Sadowski [MVP]

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.
 
O

OldDog

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top