• 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: Folder Action for changing privileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Action for changing privileges


  • Subject: Re: Folder Action for changing privileges
  • From: "J. Stewart" <email@hidden>
  • Date: Fri, 29 Jun 2007 04:53:59 -0400

On 6/29/07 at 2:45 AM, Brett Conlon <email@hidden> spake thusly:

repeat with thisItem in theAddedItems set FilePath to quoted form of POSIX path of thisItem do shell script "chmod -R 777 " & FilePath end repeat

You may be getting bitten by a long standing gotcha of repeating by reference. Try this instead (I didn't test).


  repeat with thisItem in theAddedItems
   set FilePath to quoted form of POSIX path of (contents of thisItem)
   do shell script "chmod -R 777 " & FilePath
  end repeat


When you loop using the above form what you are really getting when you refer to "thisItem' is "item x of theAddedItems" and not a file path. The addition of "contents of" to the script forces it to resolve the reference into the actual file path it contains.




JBS
--
It is inaccurate to say I hate eveything. I am strongly in favor of common sense, common honesty, and common decency. This makes me forever ineligible for any public office.  - HL Mencken
_______________________________________________
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
References: 
 >Re: Folder Action for changing privileges (From: Brett Conlon <email@hidden>)

  • Prev by Date: Re: Folder Action for changing privileges
  • Next by Date: Re: time formatting
  • Previous by thread: Re: Folder Action for changing privileges
  • Next by thread: Fw: Folder Action for changing privileges
  • Index(es):
    • Date
    • Thread