Bulk reattachment of "lost" orphaned attachments

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
alanterra
Posts: 77
Joined: Wed Dec 20, 2017 4:55 pm

Bulk reattachment of "lost" orphaned attachments

Post by alanterra »

I don't know what happened, but my database had well over 600 "orphaned" attachments (ie, references that think that they have an attachment, but for which the link to the attachment has been severed). Part of this seems to have been due to a bug in Bookends (now fixed), but I suspect most of them were due to something I did.

In any event, almost these "orphans" were exactly where they were supposed to be. If you looked at the attachment panel in Bookends, you could see that the link was exactly correct, but that somehow the link had been broken. It turns out to be very easy to fix this problem, without having to re-attach the pdfs one-by-one.

Create a new folder called, say, "Attachments Temp" and put the path to that folder as your attachments folder in Bookends preferences. Now consolidate your attachments (Refs :: Global Change :: Consolidate Attachments…). In my case, Bookends found the attachments for all the references. After it was finished, the only files in the old attachments folder were files that were not referenced by Bookends. Dealing with these was pretty easy. After you are done, you can just drag the attachments (in Finder) from Attachments Temp back to Attachments, and Bookends will maintain the link.

Anyway, this little trick just saved me hours and hours of time compared to dragging in the attachment to reestablish the connection, one reference at a time.
Post Reply