From: Peter Jones Date: 2008-05-23T10:35:03+09:00 Subject: Re: OSX Finder selected files Mark Carter writes: > I'm new to both Ruby and OS X. What I'm aiming for is to rename some > files that have been highlighted in Finder. ,---- | require 'rubygems' | require 'rbosa' | | finder = OSA.app('Finder') | | finder.selection.each do |item| | # path to file, using URL notation | puts "file=" + item.url | | # Rename the file | item.name = 'new-name' | end `---- You can also use rdoc-osa to generate documentation for a scriptable application: ,---- | rdoc-osa --name Finder `---- Finally, you might want to think about subscribing to the RubyOSA mailing list: http://rubyforge.org/mailman/listinfo/rubyosa-discuss Good luck. -- Peter Jones [pjones at domain below] pmade inc. - http://pmade.com