simplest programming question ever

Discussion in 'Mac Programming' started by harleytat, Jan 29, 2006.

  1. macrumors newbie

    Jul 22, 2002
    I'm looking to make a script/droplet that, when a file is dropped on it, copies that file to my itunes library and then deletes the original file in the finder. I thought this would be easy to do with automator, but it looks like the "add files to playlist" action passes the resulting itunes song to the next action, making it impossible to modify (delete) the original file.

    I'm sure this can be done with applescript in 2 1/2 seconds, but I'm a dunce. any thoughts?

  2. Moderator emeritus

    Jun 25, 2002
    Gone but not forgotten.
    Use AppleScript to:
    • open iTunes
    • pass the file to iTunes
    • close iTunes
    • delete the original file

    Copying it to the library is truly difficult, if iTunes is managing your library. You must know in which album a song belongs and to which artist so that you can create folders or at least, find those folders. Getting that information from the ID3 tags, if present, would be difficult.
  3. Wes
    macrumors 68020


    Jun 22, 2001
    This appears to work. It works on the premise that, in the period between when you pass the song to iTunes and it completes adding the song to the library, you haven't changed the selected file in the finder.

    Hope this helps,


    Attached Files:

  4. thread starter macrumors newbie

    Jul 22, 2002
    oh yes

    wes, thank you. step 3 was what I was missing. glad to know this can be done so easily. I will now spend my days dragging and dropping to my heart's content...

Share This Page