Re: Apply User and Groups to Items in a Folder
Re: Apply User and Groups to Items in a Folder
- Subject: Re: Apply User and Groups to Items in a Folder
- From: Gnarlodious <email@hidden>
- Date: Wed, 19 Apr 2006 15:12:56 -0600
- Thread-topic: Apply User and Groups to Items in a Folder
Entity Todd Geist spoke thus:
>
> On Apr 19, 2006, at 10:33 AM, Gnarlodious wrote:
>
>> sudo find pathToFolder -user username -exec chown
>> username:groupname {} \;
>>
>> For an Applescript the backslash needs to be double-escaped.
>>
>> -- Gnarlie
>
> Thanks!
>
> But I don't think I get this yet.
>
> I tried
>
> tell application "Finder"
>
> set pathToFolder to choose folder
>
> set s to "sudo find " & pathToFolder & " -user <adminUserName> -exec
> chown <newOwner>:<newGroup> {} \\;"
> do shell script s
>
> end tell
>
> --> Finder Got an Error Password
>
> <adminUserName> = an admin user on the machine
> <newOwner> = the new owner
> <newGroup> = the new group
>
>
> Any ideas?
You will need to replace pathToFolder with the path to a folder, you will
need to replace <adminUserName> with the name of an admin user name, and you
will need to replace <newOwner> with the name of the new owner, and you will
need to replace <newGroup> with the name of a group owner (may be omitted).
Also, another poster was right in that "sudo" is not needed in Applescript
when " with administrator privileges" is used.
-- Gnarlie
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden