#!/usr/bin/env ruby -rubygems # pass this script some paths, e.g. `find . -name '*.m' | select_in_finder` and it will select them in the Finder. Works best with List View. require "appscript" Appscript::app('Finder').selection.set(STDIN.readlines.collect do |line| MacTypes::FileURL.path(line.strip).to_alias end)