Solved

Changing Permissions on Multiple Subfolders

Posted on 2008-10-21
3
245 Views
Last Modified: 2013-12-04
I have hundreds of folders on my file server for each Job my company works on.  Under each of these Job folders are multiple subfolders.  One of these subfolders is named Legal.  I need to edit the permissions on the Legal folder only under every Job folder.  Is there a way to do this automatically or do I have to go to each Legal folder and make the change.  I've looked for a utility to use but can't seem to find one.  I have a very limited knowledge on scripting so I don't know if that is an option or not.

Thanks for any help or suggestions,
0
Comment
Question by:lavadour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 22768881
Paste the script below into a text file with a .cmd extension.  Customize the value of the root variable with the location of the folder containing the job folders.  Customize the value of the switches variable with the cacls switches to run on the Legal folders.  See here for syntax:
http://www.ss64.com/nt/cacls.html

Running the script will change permissions on every folder named Legal located directly under each of the job folders.


@echo off
setlocal
 
set root=c:\files
set switches=/E /C /G "authenticated users":F
 
for /F "tokens=*" %%G in ('dir "%root%" /A:D /B') do (
 if exist "%root%\%%G\Legal" cacls "%root%\%%G\Legal" %switches%
)

Open in new window

0
 

Author Comment

by:lavadour
ID: 22768932
I will give it a try, thanks for the quick response.  Like I mentioned I know very little about scripting but this sould like it will work for me.
0
 

Author Comment

by:lavadour
ID: 22843913
Thank  you, this worked.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's information driven age, entrepreneurs have so many great tools and options at their disposal to help turn good ideas into a thriving business. With cloud-based online services, such as Amazon's Web Services (AWS) or Microsoft's Azure, bus…
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question