Page 1 of 1

Marooned attachments: best way to reattach?

Posted: Sun Apr 04, 2021 12:02 am
by iandol
Hi Jon, first off thanks so much for the new marooned attachments manager (MAM)!

For my core database, somehow I "lost" the links for ~1260 PDFs, they are in my attachments folder and the references are in my database, but the names do not line up (this happened quite some time ago, but I never had time to sit down and manually reattach, I manually reattach when I need to). MAM finds these attachments, which is really helpful as at least I now have a clear quantification of my problem.

Here is an example, the PDF and its database entry (a small change in the way the attachment is named, spaces around the ellipsis …):
Screenshot 2021-04-04 at 11.49.10_SMALL.png
Screenshot 2021-04-04 at 11.49.10_SMALL.png (103.52 KiB) Viewed 3170 times
So my question is what the optimal way is to automate reattaching these PDFs?

Re: Marooned attachments: best way to reattach?

Posted: Sun Apr 04, 2021 12:09 am
by iandol
If I use the attachment-pane right-click "Reattach..." method, I get to select the attachment, then I get this requestor:
Screenshot 2021-04-04 at 12.05.01_SMALL.png
Screenshot 2021-04-04 at 12.05.01_SMALL.png (21.44 KiB) Viewed 3169 times
I select add to existing attachment (i.e. it finds it correctly), which then results in a double-attachment (i.e. reattach does not replace the missing attachment, so I then have to manually unattach the broken one):
Screenshot 2021-04-04 at 12.05.39_SMALL.png
Screenshot 2021-04-04 at 12.05.39_SMALL.png (30.09 KiB) Viewed 3169 times

Re: Marooned attachments: best way to reattach?

Posted: Sun Apr 04, 2021 8:00 am
by Jon
I'll have to take a look at why it doesn't get rid of the orphaned attachment in that case.

You can get rid of it using Global Change -> Remove Orphaned Attachments. This can be applied to one reference, many references, or all references at once. Try this on a Copy of your library first to see how it works.

Jon
Sonny Software

P.S. There is also the Refs -> Get PDF -> Find & Attach Local PDFs. it's not 100%, but it when it works it will save you time. You'd still want to get rid of orphaned attachments when finished.

Re: Marooned attachments: best way to reattach?

Posted: Sun Apr 04, 2021 11:20 pm
by iandol
Thanks Jon. So the recommendation is to make a copy of my database, use the MAM to move the ~1250 marooned attachments to a temp folder, then use "Find & Attach Local PDFs", spot-check what the result is, remove orphans if necessary, then replace the main database with the copy.

Is there a way to generate a "log" of what some of the global actions like Find & Attach Local PDFs do? It would help to validate when we make major changes to our database (manual checking is hard to do when there are thousands of references in the database)...

Re: Marooned attachments: best way to reattach?

Posted: Mon Apr 05, 2021 7:59 am
by Jon
No, these actions don't generate a log.

Jon
Sonny Software

Re: Marooned attachments: best way to reattach?

Posted: Mon Apr 05, 2021 2:06 pm
by Jon
P.S. I've made a silent update and Reattach should now work as intended.

Re: Marooned attachments: best way to reattach?

Posted: Mon Apr 05, 2021 9:24 pm
by iandol
Hi Jon, I downloaded the silent update but still get the double attachment when I try to reattach the PDF:
Screen Shot 2021-04-06 at 09.18.54_SMALL.png
Screen Shot 2021-04-06 at 09.18.54_SMALL.png (152.15 KiB) Viewed 3136 times
Perhaps this depends on the renaming options. I use a custom format using a {d} t for renaming. Anyway this is fairly minor.

Regarding the log, could this be a feature request for a future version of Bookends, as I think it would be helpful, even if there is no UI, but just a simple text file that can be referenced when making a major change to a database...