Updating internal links

Hi,

Apologies in advance if this has been asked before, but is there an easy way to update internal links within documents created within Devonthink?

I’m an academic, and I store all my reference sources within a ‘sources’ database, and all my notes within a separate ‘notes’ database. These notes are often annotations of these reference sources created by using the built-in annotation template, and I can easily navigate to the reference in question by clicking the link at the top of the annotation.

However, many of these links have become broken over time, either because I have renamed the source files or moved them (I sometimes like to index files kept on my hard drive, at other times I link to keep them within Devonthink itself). Is there a straightforward way to ‘relocate’ them?

Alternatively, if I keep the notes in the same database as the reference files, are the links more likely to stay intact?

What kind of links are you creating?

If you were using WikiLinks and renamed the files, then no there is no mechanism to put this back in order.

DEVONthink’s links, x-devonthink-item://, are persistent regardless of the name or location in databases, even between databases.

It’s the latter (the Devonthink URL scheme). I know it’s probably ‘user error’ on my part, but I can’t think what I’ve done - perhaps I previously deleted some files, then re-imported them.

That would definitely break links as the newly imported files would get new UUIDs.

I wonder if there is a way to get this automatically updated? And if not at the current point of time, whether there is any work ongoing to introduce this feature in the upcoming releases?

If I understand the mechanics of DT correctly, DT entertains an index of all the files in the DB, so technically there should be not reason why [[]] could not be automatically updated by DT should the name change.

That would be a beautiful feature to have instead of relaying on 3rd party tools.

Development would have to respond further but item links work across databases so it would have to check all open databases and update all linked instances.

This is neither possible nor currently planned.

Please please consider implementing automatic update of [[]] wiki links. Right now one needs to use 3rd party products to do that. As Devon has a native wiki-link support, this feature would be a perfect fit.

As an example of behaviour I am speaking about:

I agree with jooz. Updating internal wiki links would be very important. I am also using the third-party app that jooz mentioned in the previous post. I wish Devon would have a similar feature.

For persistent and reliable cross-linking item links are recommended currently.

I’ve recently expanded a project to use lots of wiki-style linking and have run into this issue where document titles are revised over time and breaking old links. I understand that automatically updating wikilinks when the target is changed is not possible.

Are any of these workarounds possible?

  • Find and replace text across the database (Scripts > Rename > Replace Text appears to do nothing, at least for me.)
  • Convert a wikilink target into an item link without the laborious process of opening the target, copying, returning, and editing the link? Just adding copy item link of target to the context menu of the link might be enough.

The Replace Text script is made for renaming files, not for modifying the content of files in an entire database.

Convert a wikilink target into an item link without the laborious process of opening the target, copying, returning, and editing the link? Just adding copy item link of target to the context menu of the link might be enough.

I’m not sure if it’s what you’re wanting but @pete31 posted a script that may be useful to you.

Thanks for the clarification and suggestion! It looks like that script will work just fine if I run it just before renaming a document.