AppleScript script to AirDrop file to a specific device? [duplicate]

I was looking for an option to use Airdrop to sync a set of directories between two computers.

I want to achieve this wirelessly (hence chose Airdrop without having the computers connect on a network or with cross cable wires).

Is there a command to send files to another Mac? Also, is there a way to allow a Mac to automatically receive the requests?


Solution 1:

If both computers have Wi-Fi capability built-in (otherwise AirDrop won't work either), you can setup a WLAN between them directly (no additional hardware required). The procedure is extremely simple (more or less copied verbatim from Apple):

  1. Choose Create Network from the AirPort status icon in the menu bar.

    If the icon isn’t in the menu bar, choose Apple > System Preferences, and then click Network. Click AirPort and select the “Show AirPort status in menu bar” checkbox.

  2. Give the network a name and select a channel from the pop-up menu (or just use the default channel).

  3. Select the Require Password checkbox to protect your network with a password. Type the password users will need to enter in order to join your network. Unfortunately WPA/WPA2 is not supported so pick WEP128 and type a password of exactly 13 ASCII characters or 26 hex digits

From the other computer you now can access the network under the name assigned in step 2. To exchange files, either use the Public/Drop Box folders of the individual users or share a specific folder for everybody.

Solution 2:

There is now an opensource implementation for AirDrop (with some limitations)

See https://github.com/seemoo-lab/opendrop