Is there a way to share a file over AirDrop via Terminal on Mountain Lion? How so?

  • In what way? To send or receive files? It's finder functionality so to be honest I doubt it, but there maybe some AppleScript hyjinx depending on what you are trying to do. – buggles Aug 28 '12 at 17:05

I have not (yet) figured out a way to send files via Airdrop using the Terminal, but you can set your computer to receive files via Airdrop using the following shell script:

tell application "Finder"
    tell application "System Events" to keystroke "R" using {command down, shift down}
end tell
  • This would be really handy if you didn't need to accept each transfer. Perhaps that could be scripted as well. – bmike Sep 20 '12 at 22:54

No - the functionality is programmed into the core OS and lacks official hooks supplied by Apple via the command line.

  • 1
    I wish they would add that. Until then, scp will continue to be my friend. – Cajunluke Sep 20 '12 at 22:45

There is a tool on Github called terminal-share that claims to offer this functionality:

terminal-share -service airdrop -image path/to/image.jpg

But it's not clear to me how you specify a destination..

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .