View Full Version : simplest programming question ever

Jan 29, 2006, 03:13 PM
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?


Jan 29, 2006, 03:19 PM
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.

Jan 29, 2006, 03:40 PM
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,


Jan 31, 2006, 10:15 PM
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...