Page 1 of 1

Hazel Alias for Use Within an iCloud Shared Folder

PostPosted: Thu Apr 17, 2025 10:54 pm
by nlucchesi
I’m running Hazel on files in an iCloud shared folder. A Rule for this folder creates an alias to a file in this folder. Other Rules rename and sort the alias into a subfolder.

After processing, the resulting aliases work correctly within the Finder for the iCloud user who ran the Hazel Rules.

Unfortunately, the aliases do NOT work for other users who share the iCloud folder.

The reason they don’t work appears to be that the path embedded in the alias that Hazel creates starts with /User/<username> instead of starting with ~ (tilde).

Here’s a simplified example.

Steps
  1. Bob creates the folder ours and shares it with Alice.
  2. Bob creates a file named file.txt
  3. Bob runs Hazel Rules that (a) creates an alias of file.txt named file.txt alias and (b) renames file.txt alias to alias.

Results
  1. Bob and Alice have exactly the same Finder view of what’s in the iCloud shared folder, ours, namely, a file named file.txt and an alias named alias.
  2. Bob can open file.txt by double-clicking on alias.
  3. Alice gets a Finder error saying that the alias is broken when she double-clicks on alias.
  4. When Bob selects alias and presses ⌘I (Get Info), he sees the path /Users/bob/Library/Mobile Documents/com~apple~CloudDocs/ours/file.txt
  5. When Alice selects alias and presses ⌘I, she sees the same path Bob sees, namely, /Users/bob/Library/Mobile Documents/com~apple~CloudDocs/ours/file.txt, which of course can not be found in Alice’s file system.
  6. Alice’s path needs to be displayed: /Users/alice/Library/Mobile Documents/com~apple~CloudDocs/ours/file.txt


How can I make Hazel create aliases in an iCloud shared folder that resolve correctly for all users who share the folder?

Re: Hazel Alias for Use Within an iCloud Shared Folder

PostPosted: Fri Apr 18, 2025 8:49 am
by Mr_Noodle
Are you able to create aliases how you want manually in Finder?

Re: Hazel Alias for Use Within an iCloud Shared Folder

PostPosted: Mon Apr 21, 2025 7:47 pm
by nlucchesi
Before making the original post, I verified that an alias (created with the Finder) to a file in an iCloud Shared folder works correctly with other users accessing the shared folder.

But your question reminded me that my Hazel Rules do more than create an alias; they also:
  1. Rename the file
  2. Sort the file into a subfolder
  3. Rename the alias
  4. Sort the alias into a subfolder

So, I did additional testing in the Finder and discovered that when I moved the alias to another folder (within the shared folder), the alias changed and became user-specific (as I mentioned in the original post).

I need to do more testing within the Finder to determine exactly what causes the alias to change.

Thank you for prompting me to do more complete testing.