RE: I need a script (pref VB) to change permissions on a folder in mul
- From: neothwin <neothwin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 01:40:03 -0700
Hi,
pls try the batch script below.
--------------------------------------
@echo off
setlocal
rem Set the path of folder where Users' home folder exist
set SourcePath=c:\test
rem set the target folder name to search for and change permission
set TargetFolder=Example
rem set the user/group name to edit/change the permission on the terget folder
set account=everyone
rem Use xcacls and set %account% to "E" REad (Special access permission.
for /f "usebackq delims=" %%a in (`"dir %SourcePath% /ad /b"`) do xcacls
"%%a"\%TargetFolder% /t /e /p %account%:E
endlocal
@echo on
---------------------------------------
You may need to install WinXp support tool to use "xcacls". For normal
permission, "cacls" command can be used. pls do some testing first.
"Woody" wrote:
I need a script (pref VB) to change permissions on a folder in multiple.
folders.
Example, imagine users home directory, so a folder contains all the users.
Each user has a folder insiide their home driectory called 'examples'. I
need a script to search for that folder inside each users home directory and
change the permissios to 'read, list folder contents'
Can this be done?
This is not being done on users home directories but this was the best
example i could give.
Or imagine their are 10 folders named 1 to 10. inside each folder are 5
folders named A,B,C,D and E. I want a script to search for the folder named
'D' and change the permission on that folder only.
- References:
- Prev by Date: Re: Execute Script on windows server 2003 R2 x64
- Next by Date: Re: Need Help with Randomized and Incremental Numbering
- Previous by thread: I need a script (pref VB) to change permissions on a folder in multiple folders.
- Next by thread: Re: Script folder permissions change
- Index(es):
Relevant Pages
|