How to remove missing attachments from citations?

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
haydentech
Posts: 4
Joined: Fri Jan 19, 2018 7:06 am

How to remove missing attachments from citations?

Post by haydentech »

We have a very large (30,000+) citation database, and it has a few thousand broken attachment links (where the citation thinks it has one or more attachments, but the files do not exist in the Attachments directory). This causes problems for Bookends -- just clicking a citation with a broken attachment link completely hangs Bookends for 5-15 seconds, which makes working in our database like stepping through a minefield.

I'm aware that there is a function to mark citations with broken attachment links, but the shear number is way beyond what we could fix by hand, especially given the slowness of Bookends in dealing with these broken links. Is there some automated method in Bookends, or via AppleScript, that will remove any attachment links that are bogus? Note that I am not trying to reconnect attachments -- the files in question are gone.

Second, it seems like a bug in Bookends that it would hang for such a length of time when the attachment is missing. It takes the patience of a saint to work with any records in this state. Can this speed issue be improved?
Jon
Site Admin
Posts: 10061
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: How to remove missing attachments from citations?

Post by Jon »

Refs -> Global Change -> Remove Orphaned Attachments

(I'd make a copy of the library first).

As for speed -- Bookends has too look through ALL of your folders where attachments exist to find the one for that reference. Since it doesn't exist, it doesn't stop until every last folder has been examined. To minimize the search time:

1. Keep all attachments in one folder if you can (the default folder). There is a global function to consolidate them if they're scattered around.
2. Don't have subfolders in the default folder (or keep them to a minimum, anyway). That slows down searching a lot.
3. This won't help the orphaned attachment speed, but for 30K+ references you should increase the internal cache in preferences (maybe to 25-30 MB).

Jon
Sonny Software
Post Reply