• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applying permissions to all files in all subfolders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applying permissions to all files in all subfolders


  • Subject: Re: Applying permissions to all files in all subfolders
  • From: "Mark J. Reed" <email@hidden>
  • Date: Wed, 15 Aug 2007 10:54:27 -0400

On 8/15/07, Tom Giles <email@hidden> wrote:
> Thanks - we do have the folder setup that way, but it's not working
> properly which is why we are resorting to a script.  As long as i can use
> "entire contents of someFolder" in the command that triggers the script
> then it shouldn't be too slow.  My script only reapplies perms to files
> created/added to the folder.

The script as written applies perms to all files in the target folder,
whether new or not; it just only does it when new files are created.

I'm not on a Mac to test, but something like this might work - or it
might be slower than just doing everything in the folder every time:

on adding folder items to thisFolder after receiving theseItems
     tell application "Finder"
         repeat with thisItem in theseItems
               if class of thisItem is folder then
                    set owner privileges of entire contents of
thisItem to read write
                    set group privileges of entire contents of
thisItem to read write
                    set everyones privileges of entire contents of
thisItem to read
               else
                    set owner privileges of thisItem to read write
                    set group privileges of thisItem to read write
                    set everyones privileges of thisItem to read
               end if
            end repeat
     end tell
end adding folder items to

--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Applying permissions to all files in all subfolders
      • From: Tom Giles <email@hidden>
References: 
 >Applying permissions to all files in all subfolders (From: Tom Giles <email@hidden>)
 >Re: Applying permissions to all files in all subfolders (From: "Mark J. Reed" <email@hidden>)
 >Re: Applying permissions to all files in all subfolders (From: Tom Giles <email@hidden>)

  • Prev by Date: Re: Applying permissions to all files in all subfolders
  • Next by Date: Re: Applying permissions to all files in all subfolders
  • Previous by thread: Re: Applying permissions to all files in all subfolders
  • Next by thread: Re: Applying permissions to all files in all subfolders
  • Index(es):
    • Date
    • Thread