Broken file attachment links in notes (more frequent than I would hope/expect)

Having file attachment links in notes is very useful to me. The problem is they get broken a lot, and it’s annoying to have to re-link the file (etc.).

1) If the directory path to the file changes, does that break the link?

Possibly related, when I do: a Spotlight search; a Finder search (although that probably uses the Spotlight index); or an Alfred (3rd party utility) search ( again, it might use the Spotlight index), I often don’t get items returned that are on disk. I’m pretty certain this is (alway) related to my Spotlight index needing updating (which I know how to do).

2) If the directory path to a file changes, and my Spotlight index gets updated, will that solve the problem of a broken link in OmniFocus, or do I (always?) need to fix the link in OmniFocus?

You might want to take a look at Hookmark (https://hookproductivity.com).

It’s all about linking: to things and between things. You would be able to use Hookmark to create a link to a file and create a OF task from that (or embed the link in a note) and the HM link will work even if the file is moved.

1 Like
  1. If the directory path to the file changes, does that break the link?

Kind of, at least in OF3 and macOS 26 or later. If you rename the file or otherwise change its path, when you try to open it from OF you should see a dialog with the message “The attachment “…” has been moved. You can open it now to update the link, or cancel to resolve the problem later.”. AFAICT, the dialog always opens in the folder currently containing the file, unless you have trashed it. Then you have the possibility of locating the file in that folder and repairing the link.

In other words, OF can find a file that has been renamed or moved, but it asks you to confirm that you indeed want to open it in the new location. I don’t know why it doesn’t do it automatically or why it doesn’t open the dialog with the file already selected. It’s possibly a security feature.

Another message you may see for certain kinds of files is Permission is needed to open attachment “…”. You can open it now to update the link, or cancel to resolve the problem later. This dialog also opens in the folder containing the file you are trying to open. I think that this is also a security measure to avoid accidentally opening malicious or executable files.

  1. If the directory path to a file changes, and my Spotlight index gets updated, will that solve the problem of a broken link in OmniFocus, or do I (always?) need to fix the link in OmniFocus?

I have recently rebuilt the Spotlight indexes, and the behavior I see is how I have described it above.

If you don’t see the results you want from Spotlight, Finder searches or apps that use Spotlight, rebuilding the indexes will likely fix that, but, unless “broken” for you means something different from what I’ve described above, that won’t help with “broken” OF links.

1 Like

That is super helpful, thank you so much! Having the dialogue open to the folder where the file is located is awesome. (Makes me wonder if, under the hood, the file name or ID is stored and used to open the directory it is (now) in.)

My recollection is I had to hunt for it In older macOS’s. (Snow Leopard?; jk ;) ).