From: has Date: 2007-12-08T13:15:05+09:00 Subject: Re: Identifying a volume as being an iPod On 8 Dec, 00:36, John Joyce wrote: > What I want to do is fundamentally this: > move some audio files (non-DRM'd, the type you've taken off of CD's > yourself, and which have already been converted to mp3 or aac > formats) into the iTunes library. Adding audio files to iTunes is easy enough, if typically under- documented: require 'appscript' include Appscript ITunes = app('iTunes') files = [ MacTypes::Alias.path('/path/to/file1.mp3'), MacTypes::Alias.path('/path/to/file2.mp3'), ... ] track_refs = ITunes.add(files) # add files to iTunes library p track_refs If you want to add the files to a specific user playlist as well as the main library playlist, you can supply a reference to that playlist via the optional :to parameter: ITunes.add(files, :to=>app.playlists['your playlist']) If the tracks are on an iPod that's already listed in iTunes, it may also be possible to directly copy them in iTunes without having to muck about in the file system at all. However, I'm not an iTunes guru so unless there's any other ruby-talkers here who happen to know you may need to ask on one of the AppleScript lists or look for existing examples on http://dougscripts.com/itunes for help there. HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org