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:
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.
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