There are two general cases.
Case #1. You want to move files in a DEVONthink indexed folder.
When you create a file using
Hook to New, Hook normally uses the
hook://file/ URL schemes to identify that file. However, if you move that file into a DEVONthink indexed folder, and then invoke Hook on that file, Hook will use its DEVONthink integration script to identify the file. By default that integration script uses the
x-devonthink-item URL scheme. When you invoke Hook on that file, it will not be able to tell that this file is the “same” file as outside DEVONthink, because they have different addresses. (Think of addresses as unique identifiers.)
There are ways to get around that.
- you can change Hook’s DEVONthink “get address” script to use a
hook://file/ address instead.
- you could open the file in a third-party non-DEVONthink app. For instance, if it’s a PDF file, from within DEVONthink you can open it with Preview or Skim.app. When you invoke Hook on the file in that context, Hook will use the Preview or Skim “Get Address” scripts which return a
If, you choose option 1, then inside DEVONthink, you want to use
hook://file/ addresses instead of
x-devonthink-item URLs, here are some instructions: Customizing Hook Integration with DEVONthink – Hook.
NB: Whether or not you choose Option 1, Option 2 will always be available to you. Preview and Skim (and other text editing and PDF apps) know nothing about DEVONthink addressing schemes.
Case #2: However, if instead of moving these files in DEVONthink indexed folders, you import them in a DEVONthink proper database, then the previously created hooks will not be available in DEVONthink. The reason is that you are not moving the files, you are copying them into DEVONthink. So Hook can’t tell they are identical. The original files are still hooked to their source. Moreover, some of the considerations of Case 1 apply.
Updated 2021-06-15 16:18. Separated in 2 cases