Re: Permissions when new folder made
Re: Permissions when new folder made
- Subject: Re: Permissions when new folder made
- From: Sander Tekelenburg <email@hidden>
- Date: Mon, 26 Apr 2004 18:37:04 +0200
At 14:41 +0100 UTC, on 2004/04/26, Simon Forster wrote:
[...]
>
2) How can I set the new directory to have permissions of 777? Do I
>
have to "do shell script..."?
Either that or use the Finder, whose item class has these properties:
owner privileges read only/read write/write only/none
group privileges read only/read write/write only/none
everyones privileges read only/read write/write only/none
Using Finder you can achieve 777 thusly:
set folder_name to "test"
set target_location to choose folder
tell app "Finder"
set new_folder to (make new folder at target_location with properties
{name: folder_name})
set owner privileges of new_folder to read write
set group privileges of new_folder to read write
set everyones privileges of new_folder to read write
end tell
With do shell script it'd be something like this:
set folder_name to "test"
set new_folder to quoted form of POSIX path of (((choose folder) as text) &
folder_name)
set create_folder to "mkdir " & new_folder & "; chmod 777 " & new_folder
do shell script create_folder
--
Sander Tekelenburg, <
http://www.euronet.nl/~tekelenb/>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.