How to sync the ‘Downloads’ folder with iCloud Drive on macOS without disrupting AirDrop functionality

icloudmac

In macOS, files downloaded using Safari and Chrome are by default saved in the 'Downloads' directory located in the user's home folder. macOS also accepts files from AirDrop, which are also typically saved to the 'Downloads' directory in the home folder.

However, this directory is not managed by iCloud Drive, so its contents are not automatically synchronized to other devices by default.

To address this issue, I've attempted to back up the files in the 'Downloads' directory and then create a symbolic link to it as follows:

rm -rf ~/Downloads
ln -sf ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Downloads ~/Downloads

This approach allows files downloaded from Safari or Chrome to be synchronized with iCloud Drive and other devices. However, it also causes a new issue: AirDrop no longer works. Specifically, other devices (e.g., iPhone) can see the macOS device in AirDrop, and when selected, macOS makes the corresponding sound and opens the '~/Downloads' directory (which is a symbolic link in this case). However, the target file for the AirDrop transfer is not present.

Is there a way to have both the 'Downloads' directory managed and synchronized by iCloud Drive while also allowing AirDrop to work correctly?

Best Answer

Found a way to do this.

  1. Launch Automator.app
  2. Create a new Folder Action.
  3. There should be a dropdown menu says Folder Action receives files and folders added to at the top. Now select ~/Downloads from this dropdown menu.
  4. On the left of the window, find Move Finder Items, and then drag and drop it on to the workflow window on the right.
  5. In the Move Finder Items action, select target folder, say ~/Library/Mobile Documents/com~Apple~CloudDocs/Downloads.
  6. Save it by Command + S.

From now on, whenever you place a file in your source folder, say ~/Downloads, Automator will move the file to the destination folder, say ~/Library/Mobile Documents/com~Apple~CloudDocs/Downloads. You don’t need to press any keys or launch any utilities; it all happens on its own.

Related Question