A Digital Life

My Notebook

View My GitHub Profile

  • About
  • 15 February 2022

    Make Mac Downloads Folder Sync to iCloud

    by kerner1000

    On a Mac, you can enable iCloud sync for your Desktop and Documents folder. This will sync all files in those folders accross all your devices, oncluding mobile devices such as iPhone or iPad. How to do so is described here.

    This does not include your Downloads folder, though. But there is an easy way to sync the Downloads folder as well:

    1. First, move all your files from ~/Downloads to the new location. For example, your iCloud Downloads

      (/Users/$USER/Library/Mobile Documents/com~apple~CloudDocs/Downloads)

      or Dropbox Downloads

      (/Users/$USER/Dropbox/Downloads).

    2. Second, backup .localized:
       cp -av Downloads/.localized ~/
      
    3. Next, remove ~/Downloads:
       sudo rm -rf Downloads/
      
    4. Then create a symlink to your target folder, for example iClouds Downloads or Dropbox downloads (see above):
       ln -sv ~/Dropbox/Downloads ~/Downloads
      

      Or, for iCloud:

       ln -sv ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Downloads ~/Downloads
      
    5. Restore .localized backup:
       mv ~/.localized ~/Downloads/
      
    6. Restore folder permissions:
       chmod -h 700 ~/Downloads
      
    7. Done! Your ~/Downloads is now synced!
    tags: files and folders - mac