Change a set of characters in a broken attachment link

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
talazem
Posts: 71
Joined: Sat Jan 14, 2006 5:18 pm

Change a set of characters in a broken attachment link

Post by talazem »

Hello. I have about 400 references where Bookends cannot find the file attachment. The problem seems to have occurred when I imported them; somehow, the apostrophe is has been converted into ' , while in the files BE is looking for, it is just a normal apostrophe. I need a way to tell BE to replace the the characters ' with an ' (apostrophe) every time it is looking for such a broken link. This would be much easier than removing orphaned attachments and then having to reattach them again, since the PDF's are all there, but just need this character replace.

Is there a way to do this using SQL/regex? If there is, could someone provide what should be typed in? Many thanks.
Jon
Site Admin
Posts: 10296
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Change a set of characters in a broken attachment link

Post by Jon »

Hi,

You can't use the SQL find feature in Bookends to modify the database, it's for searching only. Here are the options I can think of (to be done on a COPY of your database, because they are not undoable):

1. Global Change -> Removed orphaned attachments
2. Get PDF -> Find & Attach Local PDF -- that will probably find and attach the majority of them, but not all

Remember, do this on a copy.

Jon
Sonny Software
talazem
Posts: 71
Joined: Sat Jan 14, 2006 5:18 pm

Re: Change a set of characters in a broken attachment link

Post by talazem »

Thanks, Jon. Is there any way to at least use the SQL find in order to collect all the entries with orphaned attachments?
Jon
Site Admin
Posts: 10296
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Change a set of characters in a broken attachment link

Post by Jon »

No, because the only way to identify them as orphaned is to have Bookends search for them. The SQL search can tell you which refs have attachment entries (or clicking on the attachments "group"), but to see if they are actually available (e.g. not deleted or renamed) Bookends has to look for them, which is does when you click on the reference. But that wouldn't change my advice -- get rid of orphaned attachments and have Bookends reattach them from the local HD.

Jon
Sonny Software
talazem
Posts: 71
Joined: Sat Jan 14, 2006 5:18 pm

Re: Change a set of characters in a broken attachment link

Post by talazem »

Thanks. I've actually done that and spent the majority of the evening attaching the files. But I've noticed that whenever a file is moved or deleted, the whole programme stalls -- I'm assuming that BE is 'looking' for the file elsewhere on the hard drive. Thus, in order to pinpoint which entry is causing the problem, it'd be good to have a collection for entries with missing files.

In any case, many thanks. Implementing your earlier advice, though laborious, was necessary.
Post Reply