Need some help with Automator

Discussion in 'Mac Apps and Mac App Store' started by mkirkwag, Nov 4, 2006.

  1. mkirkwag macrumors newbie

    Nov 4, 2006
    Although I've used a Mac forever and thought I more or less understood macros, I seem to be a drooling idiot with Automator. Examples? The "how to do it" sample script in Automator Help doesn't run for me! I once tried renaming all the songs labelled "beatles" to "The Beatles" and ended up with my whole library showing "The Beatles" as the artist. Thank goodness for ieatbrainz.

    So with that in mind, here is what I'm trying to do. I download songs from our family server (or wherever), drag them from the download folder onto the iTunes icon, go back to the downloads folder (it's actually a specific folder within the downloads folder) and delete the songs from there. I'd like to automate this process.

    It seems like I should be able to set up an Automator script to run automatically whenever something appears in that folder, but I sure can't figure it out. When I drag "GetFinder Items" or "Copy Finder Items" I don't see any place to specify what folder or items. I SO DON'T GET IT!
  2. XNine macrumors 68040


    Apr 7, 2005
    Why are you wearing that stupid man suit?
    Well, I was going to reply to this last night btu got really tired and figured someone else would. Apparently I was wrong.

    The thing to remember about automator is that it's basically there to eliminate small steps to a greater means. Baby steps, not large ones.

    What you may be looking for is a FOLDER ACTION. Right click on a folder, select ENABLE FOLDER ACTIONS, the right click again and ATTACH FOLDER ACTIONS. There's a list of actions you can choose that will be attached to said folder from that point, you can even edit the scripts if you know applescript (which, you probably don't, most people don't.)

    Now onto Automator:
    Follow me on this one:
    set up a folder on your desktop and label it Pics

    In Automator:
    Get specified finder items. Drag it to the right. Now, in it, select the + sign and select the folder you just created. Now minimize Get Specified field.

    Next, move the Get Folder Contents action under the above step. Since we have no subfolders, that option doesn't have to be checked. minimize this step.

    Next we'll do the Rename Finder items. The first field will be Add Date or Time. Then seleect Date/Time: CREATED, Where: Before Name, and leave everything the same.

    Now, we run the script. I picked a site from Google to use an example. No porn or anything (though this script could be used for just that, I guess).

    Go there. In Automator, run the script. If it works, GREAT! If not, there's some tinkering to be done and you can modify these actions as well. I generally save the scripts as FINDER PLUGINS which will make them appear when you right click and choose Automator.
  3. j26 macrumors 65832


    Mar 30, 2005
    Heres the steps for that - I do something very similar but I use AIFF files as my raw material, so that could make a difference to the workflow. You could try the "Add files to playlist" action and it might work - just create a dummy playlist for import purposes in iTunes.

    Find Finder Items - Whose extension is .aif (you could use "kind is audio")

    Import Audio File - using whichever encoding you use (AIF, AAC, MP3) and click the "Delete source after import" and Bob's your uncle. Files are found and music imported, and the original source files are deleted.

    I dunno about getting it to work whenever an audio file hits the folder, but you can save the workflow as an application and save it in the scripts library and run it whenever you want from the list.

    PS If you click the little triangle beside the action once you have it in the right hand screen, it should show you the options you have for the action
  4. mkirkwag thread starter macrumors newbie

    Nov 4, 2006
    Thank you both!!!

    I now have a functioning script! And thanks for the reminder about the little triangle - I was blank for awhile about where the choices were.

    What I ended up with was this:
    Get specified finder items (the folder I send music to)
    Get folder contents
    Import Audio file (encoded mp3)-delete source
    Add files to playlist

    This works especially well for me, as I download files from different sources - songs my husband has bought and put on a shared space for me, which go into whatever playlist is appropriate, songs a friend is converting to digital for me from my old media, a few at a time (same thing), and songs I download to "audition" before I choose to buy them - those go into an audition playlist so I don't do any accidental "shoplifting" by losing track of them. This way, I can just run the right script, and they end up right where they belong. Cool!

    The only thing I noticed is that the import to iTunes is substantially slower than it is when I simply drop the song on the icon. Any idea why?
  5. j26 macrumors 65832


    Mar 30, 2005
    I'd imagine that's because it's re-encoding the song to whatever you chose.
    If they're already in the right format you could try the Add Files to Playlist action - I hven't tried it, but it might work.
  6. mkirkwag thread starter macrumors newbie

    Nov 4, 2006
    I'm a little confused by what you mean - the action I'm using *is* add files to playlist.
  7. j26 macrumors 65832


    Mar 30, 2005
    I use 'Import Audio File', so obviously 'Add Files to Playlist' is not faster.

Share This Page