I am trying to write a folder actions which accepts folders only and then attaches a folder action to the added folder. I am stuck at trying to attach a folder action to the added folder.
Does anyone have any ideas? How can I tell the finder to attach a folder action to a folder via AppleScript?
If you oopen the “Folder Actions” dictionary using the “Open Dictionary…” command of Script Editor you will find the commands for attaching, removing, editing etc.
tell application "Folder Actions"
attach action to alias -- the folder to attach the action to
using alias -- a file containing the script to attach
end tell