How to share a local folder in iCloud but maintain local file hierarchy
When you turn on Desktop & Documents Folders in iCloud settings on macOS this will synchronize all files in /users/JaneSmith/Desktop and /users/JaneSmith/Documents with these files stored in the cloud.
The files on my mac were all organized under ‘/users/JaneSmith/My Files’. I didn’t want to put my files under /users/JaneSmith/Desktop or /users/JaneSmith/Documents in case I wanted to synchronize those folders in the future with iCloud. I didn’t want all my files accessible through iCloud. I also wanted to keep my local file structure unchanged. I wondered why Apple decided to only allow synchronization for the Desktop and Documents folder and no others.
I experimented with creating a symbolic link to one of my folders on my mac to see if the contents of the folder would also be synchronized. . I created a symbolic link from /users/JaneSmith/Documents/Medical to /users/JaneSmith/My\ Files/My \Documents/Medical folder. The problem with this is that when I attempted to access the files in the Medical folder using my iPhone, it just showed me the link; the files themselves were never synchronized and made available on in the cloud.
I thought about creating a hard link instead of a symbolic link but found that you cannot create a hard link to a folder. This could create ‘infinite loops’ and other problems if it were implemented by Apple.
Any suggestions are welcome.
Mac mini, macOS 15.0