Need help with making a folder action...

Discussion in 'Mac Programming' started by rpcornelius, Jan 8, 2010.

  1. rpcornelius macrumors newbie

    Joined:
    Jan 8, 2010
    #1
    Hi,
    I need some help building a folder action.
    What I an trying to do is Build a folder action that will import photos to iphoto.
    The part that I am having a problem is that I would like the folder action to be applied to all of the sub folders but i can't figure out how to get the folder action to be automatically added to a newly created sub folder.
    Any help would be appreciated.
    Ryan
     
  2. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    You can script System Events to install actions, although this won't work if the files you want to process are in the folder before you add the action, obviously. I haven't tested this, but try it.

    Code:
    tell application "System Events"
    	try
    		attach action to folder "myPath:myFolder:" using "myScriptToInstall.scpt"
    	end try
    end tell
     
  3. rpcornelius thread starter macrumors newbie

    Joined:
    Jan 8, 2010
    #3
    Any thoughts on how to modify that script so that every time a new sub folder is added It will attach the folder action?
     

Share This Page