MacOS – Sync only Desktop folder, but not Documents, with “Store in iCloud”? (iCloud Drive)

icloudmacos

The Store in iCloud function that was introduced with macOS Sierra looks interesting to try out. It will store both the Desktop and the Documents folders in iCloud Drive instead of on the local drive.

I want it to store only the Desktop folder in iCloud, and not the Documents folder. Is this possible?

I noticed that by turning On and Off the Store in iCloud function, the files that had already been transfered to iCloud Drive (when the function was originally turned On) stayed there – and empty folders called Desktop — Local and Documents — Local were created in the user home directory.

So is it possible to make use of this circumstance, to keep only Desktop files in the iCloud? Will applications that make use of the Documents folder decide to use the iCloud folder or the local folder?


Update MacOS Catalina:

I don't think toxefa's answer below is working anymore with macOS Catalina. Upgrading the OS created a new empty Desktop folder in the user home directory. I tried deleting that Desktop folder via Terminal (rm -rf /Users/<yourusername>/Desktop) and then created a symlink per the answer ln -s /Users/<yourusername>/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop /Users/<yourusername>/Desktop, but after reboot the symlink is gone and a new empty Desktop folder is always created in the home directory.

Best Answer

Doesn't look like there's a way to single out the Desktop via the 'Manage Storage' GUI.

However, you can always just symlink any directory from your iCloud drive; that way you can ensure that only the Desktop folder is being synced. This is with the caveat that while your Desktop files are being stored in iCloud, they're still taking up space on your HD before, during, and after sync. If you do it on every Mac then you'll keep your Desktop in sync between them all (files added, deleted, changed etc); this might not be what you're after though.

If symlinking isn't something you know how to do, instructions are below.


Backup (via TimeMachine or whatever you use).

Then fire up Terminal and run the following to move your Desktop folder into your iCloud Drive:

mv ~/Desktop /Users/<yourusername>/Library/Mobile\ Documents/com~apple~CloudDocs/

Then just symlink it to the usual 'Desktop' location:

ln -s /Users/<yourusername>/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop /Users/<yourusername>/Desktop

Now anything that you add to ~/Desktop (by dropping things onto your desktop etc) will actually be dropped into your iCloud drive. They are of course still taking up local space on your machine. When you delete something from your desktop then it's gone from the 'Cloud' as well. The benefits of this are more for sync between machines (+ access via your iPhone of course).


If you've got another mac, move anything you value from it's desktop folder into your iCloud Drive 'Desktop' folder first, then delete ~/Desktop on that machine and symlink again as above.