• 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
Are folder actions in 10.8 completely broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Are folder actions in 10.8 completely broken?


  • Subject: Are folder actions in 10.8 completely broken?
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 07 Jun 2013 18:31:15 -0400

I just created a great little script that writes out a plist of folder contents if the contents of a folder are changed by adding files or deleting them.  

Works like a charm on 10.6.8

I copied it over to my 10.8.3 server, enabled Folder Actions, applied the script to a folder and immediately got fpermittedfrontasns errors, even though GateKeeper is set to allow everything to run.

It turns out this is one of Apple's AWESOME security PITA issues and you have to disable gatekeeper with this command:

spctl --master-disable

But now that that is fixed, I get nothing at all in the console log when I either duplicate a file in that folder from that Mac, or when logged into the folder that is served up ala an AFP share point.

The folder action doesn't run at all.

Any ideas?  

Here's the script if anyone wants it.

-- Alex Zavatone
-- 06072013

on adding folder items to thisFolder after receiving theseItems
log ("Items added to: " & thisFolder)

--log (thisFolder)
set myFiles to getFolderFileList(thisFolder)
log ("After run")

parseMyFiles(thisFolder, myFiles)
end adding folder items to

on removing folder items from thisFolder after losing theseItems
log ("Items removed from: " & thisFolder)

set myFiles to getFolderFileList(thisFolder)
log ("After run")

parseMyFiles(thisFolder, myFiles)
end removing folder items from


on getFolderFileList(thisFolder)
log ("In getFolderFileList")
tell application "Finder"
try
set myFiles to list folder thisFolder without invisibles
on error myError
log (myError)
log (myFiles as text)
end try
log ("done getting directory contents")
end tell
return myFiles
end getFolderFileList

on parseMyFiles(thisFolder, myFiles)
log ("In parseMyFiles")

set myPath to thisFolder as text
set myFilePath to thisFolder & "fileList.plist" as text
--------------
tell application "System Events"

set the plistfile_path to "~/Desktop/examplearray3.plist"
set the plistfile_path to myFilePath

-- create an empty property list dictionary item
set the parentArray to make new property list item with properties {kind:list}

-- create new property list file using the empty dictionary list item as contents
set pl to ¬
make new property list file with properties {contents:parentArray, name:plistfile_path}

-- add the values to plist
tell pl
make new property list item at end with properties {kind:string, value:myFiles}
end tell
end tell

log ("-- done writing sample file")
end parseMyFiles
 _______________________________________________
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: Are folder actions in 10.8 completely broken?
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: Re: String manipulation
  • Next by Date: Re: automator and Applescript
  • Previous by thread: Re: String manipulation
  • Next by thread: Re: Are folder actions in 10.8 completely broken?
  • Index(es):
    • Date
    • Thread