Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

2 Answers 2

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:

#!/usr/bin/osascript
tell application "Finder"
    activate
    tell application "System Events" to keystroke "R" using {command down, shift down}
end tell
share|improve this answer
    
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
add comment

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

share|improve this answer
1  
I wish they would add that. Until then, scp will continue to be my friend. –  CajunLuke Sep 20 '12 at 22:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.