Re: I need a script (pref VB) to change permissions on a folder in multiple folders.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Sorry if it seems vague, after reading back to myself I see what you mean.

OK, All our network users have roaming profiles. A lot of them have a habit
of saving large files to their desktops, then complain when it takes an age
to log on because they have a 40mb file on heir desktop. What I wanted to do
was search all the roaming profiles of the users and find the 'Desktop'
folder. Then make that folder on the server read access only or Deny write.

Could this be done the way I mentioned below?


"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:O2%23%23ny6EIHA.4752@xxxxxxxxxxxxxxxxxxxxxxx

"Woody" <tosca925@xxxxxxxxxxxxxxxxx> wrote in message
news:uM0kqF3EIHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
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 inside their home directory called
'examples'. I need a script to search for that folder inside each users
home directory and change the permissions 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.


Your post is a little vague. You write that you wish to apply "read-only"
permissions to the "examples" folder but you never say WHO is supposed
to have this read-only right. You also do not state if the new permissions
should apply to this folder only or to its subfolders too.

Here is a simple batch file solution to get you started. It will give
everybody read-access to the "examples" folder. Remove the word "echo"
to activate it.

Line1=@echo off
Line2=set target=d:\Users
Line3=for /F "delims=" %%a in ('dir "%target%" /ad /b ^| find /i
"examples"') do echo cacls "%%a" /e /r domain\everyone
Line4=for /F "delims=" %%a in ('dir "%target%" /ad /b ^| find /i
"examples"') do echo cacls "%%a" /e /g domain\everyone:R




.



Relevant Pages

  • Re: Minimum NTFS Permissions - Theres such a thing???
    ... ?2001 Microsoft Corporation. ... HOW TO: Set Minimum NTFS Permissions Required for IIS 5.0 to Work WGID:198 ... " List Folder Contents" ...
    (microsoft.public.inetserver.iis.security)
  • Re: Vista makes me crazy, please help.
    ... so if the admin me ... to be restricted from that folder. ... permissions on everything". ... You have total control over your home directory and everything under it. ...
    (microsoft.public.vb.general.discussion)
  • Re: Unable to delete orphaned 1.5 GB System Restore folder
    ... The fact that the tech support is based in India has nothing to do with the ... If so you may want to leave this folder alone. ... down to all children folders because i can set those permissions to ... try deleting from the command line using system by using the AT ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Unable to delete orphaned 1.5 GB System Restore folder
    ... The only computers i fix are my own. ... If so you may want to leave this folder alone. ... it includes all subdirectories with inherited permissions. ... try deleting from the command line using system by using the AT ...
    (microsoft.public.windowsxp.security_admin)
  • RE: no OWA
    ... have the correct permissions was the "inetpub" folder. ... Correct the settings in IIS: ... click to check the "Hide All Microsoft Services" ...
    (microsoft.public.windows.server.sbs)