Created
August 16, 2010 15:40
-
-
Save ucnv/527149 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = File::expand_path ARGV.shift | |
scpt = <<SCPT | |
tell application "Finder" | |
activate | |
select POSIX file "#{path}" | |
end tell | |
tell application "System Events" | |
tell process "Finder" | |
keystroke "y" using {command down, option down} | |
end tell | |
end tell | |
SCPT | |
system("osascript -e '%s'" % scpt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment