Scripting/Automator Questions

Discussion in 'macOS' started by cmcconkey, May 8, 2008.

  1. cmcconkey macrumors 6502

    Joined:
    Nov 22, 2005
    Location:
    Rocky Face, GA
    #1
    I am trying to set up a script that would watch a folder and move its contents into 2 other locations. I have the script working but I can't figure out how to get it to keep running. I will need it to run anytime the server is up and running. What I have found is the "loop" action in automator but it doesn't seem to give me the option to keep the script/workflow looping.

    If someone could give me some assistance on this I would appreciate it.
     
  2. alfaphlex macrumors newbie

    Joined:
    Feb 18, 2008
    #2
    When you're done creating your workflow:

    1) File-> Save as Plugin
    2) Select Plugin For "Folder Actions"
    3) Right click on the folder you wish to attach the action to and "More->Configure folder actions"
    4) On the left half, you can add the folder(s) you want to apply actions to by clicking the + button at the bottom.
    5) Once you add the folder(s), select the folder on the list and on the right side, you can add any of your saved actions as well as some already useful actions that came with the OS by click on the + button.

    Any action applied to folders will run automatically whenever the folder is modified (file moved, created, renamed, etc)

    Enjoy.

    Oh yeah, you can enable folder actions and attach an action to folders individually through the right-click More submenu, but then you have to actually dig through the finder to find the scripts. Using the above method, the scripts are automatically listed for you (yours conveniently at the top), along with a bunch of default ones, and you can configure multiple folders/actions at a time.

    extra tip- I have some folder actions similar to what you're trying to do.

    You can achieve this in 2 steps with automator.
    1) Filter Finder Items
    2) Move Finder Items
     
  3. cmcconkey thread starter macrumors 6502

    Joined:
    Nov 22, 2005
    Location:
    Rocky Face, GA
    #3
    Well I got the script written and tested it on my local machine. It works great, but when I go to put it on the server it doesn't clear the folder and only copies to one place.

    What did I do wrong?

    Christopher
     

Share This Page