+ Post New Thread
Results 1 to 2 of 2
General Chat Thread, Script to change folder permissions in General; I currently have our current domain and a new domain running with a new way trust! What I want to ...
  1. #1
    scottyses's Avatar
    Join Date
    Dec 2007
    Location
    Stamford, Lincolnshire
    Posts
    41
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Script to change folder permissions

    I currently have our current domain and a new domain running with a new way trust!

    What I want to do is add the new domain permissions on to the folder.

    For example a shared area might have 3 permissions on it currently
    SES\S-Staff
    SES\JLBloggs
    SES\MLBloggs

    I want the script to copy the username/group and put our new domain credentials on

    STAMFORD\S-Staff
    STAMFORD\JLBloggs
    STAMFORD\MLBloggs

    Is there a script I could use to do this or otherwise it will be alot of work going through each folder and adding the new permission

    Thanks

    Scott@Stamford Endowed Schools
    Last edited by scottyses; 14th January 2008 at 08:28 PM.

  2. #2
    DSapseid's Avatar
    Join Date
    Feb 2007
    Location
    West Sussex
    Posts
    1,155
    Thank Post
    131
    Thanked 54 Times in 47 Posts
    Rep Power
    38
    You could try this. I would try it on dumy folders first before you do it on the live folders just incase! I didnt do this once and regreted it.

    Code:
    for /D %%i in (*) do (
    calcs %%i /T /P /G STAMFORD\S-Staff:f
    cacls %%i /T /E /G STAMFORD\JLBloggs:f
    cacls %%i /T /E /G STAMFORD\MLBloggs:f
    
    )
    This line adds the username of the folder into the permissions

    cacls %%i /T /E /G mcc\%%i:f

    So if the folder is called MLBloggs and the logonname is MLBloggs then it will give it permissions over it.

    Hope this helps.



SHARE:
+ Post New Thread

Similar Threads

  1. Change Password Permissions
    By Jamie_a in forum Windows
    Replies: 6
    Last Post: 17th December 2007, 04:20 PM
  2. Script To Change A Registry Key
    By DaveP in forum Windows
    Replies: 6
    Last Post: 7th March 2007, 01:57 PM
  3. script to change permissions on Reg Key
    By e_g_r in forum Windows
    Replies: 4
    Last Post: 16th February 2007, 06:48 PM
  4. Replies: 4
    Last Post: 23rd November 2006, 10:33 PM
  5. Change folder creation date
    By ajbritton in forum Windows
    Replies: 8
    Last Post: 16th November 2005, 05:59 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •