Re: Applying permissions to all files in all subfolders
Re: Applying permissions to all files in all subfolders
- Subject: Re: Applying permissions to all files in all subfolders
- From: Tom Giles <email@hidden>
- Date: Wed, 15 Aug 2007 15:24:23 +0100
- Organization: BD Solutions
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.
Script below:
on adding folder items to thisFolder after receiving theseItems
tell application "Finder"
set owner privileges of entire contents of thisFolder to read write
set group privileges of entire contents of thisFolder to read write
set everyones privileges of entire contents of thisFolder to read
end tell
end adding folder items to
Mark J. Reed wrote:
Exactly how are you changing the permissions? I only ask because it's
possible to set up a folder such that new files created within it
automatically inherit its group ownership, which in some cases is all
you need to get around permissions issues. But in other cases it's
not, and you need a script.
The Finder has an "entire contents of someFolder" command that returns
all the items underneath that folder, recursively; you could use that
in your permissions script, but if there are lots of folders and
subfolders and files it might be too slow, especially if it's getting
run every time someone adds a new item and that happens often.
On 8/15/07, Tom Giles <email@hidden> wrote:
Hi,
I'm a newbie with AppleScript so please bear with me here! We've been
having problems with permissions on a file share on our server, so i've
decided to write a little folder action script to reapply the perms on
the creation of a new a file. So far so good. However this only works
for the top level of the folder. I need to apply to every existing
subfolder and any new ones created. I was thinking i could do this by
writing another script which gets a list of all the subfolders and
attaches my script to them. Is it possible to do this? I can't find out
how I would.
The other alternative i've thought of is using Automator, but i'm not
sure how that integrates with folder actions.
Thanks for your help and apologies if this has been asked before...
Thanks
Tom
--
Please note: the clock on my laptop is not functioning correctly and so the time this email looks like it was sent will no longer be correct.
___________
BD Solutions
3rd Floor
95A Rivington Street
London
EC2A 3AY
0207 739 3001
_______________________________________________
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
--
Please note: the clock on my laptop is not functioning correctly and so the time this email looks like it was sent will no longer be correct.
___________
BD Solutions
3rd Floor
95A Rivington Street
London
EC2A 3AY
0207 739 3001
_______________________________________________
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