Multiple databases to index the same external folder?

Experiment: I found that if the same external Finder’s folder is indexed to multiple DT databases, the same file within the index folder will have a different reference url for each database. This multiple URLs situation is expected but is it OK to do that?

The reason that I am asking is relating to the way an image is to be linked in the markdown file.

For a personal-used scenario
(1) If DT-Link is pasted into an md file e.g.,![](x-devonthink-item://13647823-FD8D-4FE6-8002-XXXXXXXXXXXX), the image is viewable in any DT databases but is not viewable by external md editor (at least for the one I tested. I tried cmd-click but get image load failed message)

(2) It seems that the image is viewable in both DT and external editor if the actual file path in Mac OS is used for the link: e.g. ![Screenshot xxxxx ](/Users/xxxxxx/Library/Mobile Documents/com~apple~CloudDocs/xxxxxx/Images/Screenshot xxxxx.png)
. However, if I only want to maintain one single reservoir of images for multiple MacOS and iOS devices, the most sensible thing (to me) seems to be setting up one image folder on iCloud (or dropbox) and index the folder into DT. Hence I ask the question mentioned-above.

Correction: need to use html link for file path if compability is needed e.g. <img src="/Users/xxxxxx/Library/Mobile Documents/com~apple~CloudDocs/xxxxxx/Images/Screenshot xxxxx.png\> . But the good news is I can now zoom the image! By adding e.g. style="zoom:50%" within the bracket. But is this still md document?

(3) From this forum, I understand that (in a limited manner) we can also use relative path. But I don’t need to share those images with others 99% of the time, therefore I don’t want to see each md file (or md files in the same group) carrying a sub-group (my md files - if used - will be scattered in many different groups).

Thanks again for the patience.

1 Like

I am answering to myself: maybe an option is to set up an index folder for image assets in DT’s global inbox. So I can use file path linking method for compatibility while maintaining only one index folder for all databases.

Or perhaps DT would consider in the longer term, for markdown related function, to add a preference setting for user to select an image assets folder on the Mac OS (just like other md editors).

Just wondering but what kind of images did you index to multiple databases for Markdown editing?

I guess you are asking “why” I want to put images in one index group to be shared by multiple DT databases?

(1) I want to use html link for images in md file because I want the compatibility to see the image both internally at DT and externally at other md compatible editors. It seems DT link is not compatible to perhaps some external editor. I don’t want to use relative path coz there will be sub-groups in each cluster of md files. If the index folder is located in iCloud or Dropbox, I “guess” it means I can read and view the image of the md files in DT on any of my devices.

(2) DT’s internal folder does not have a pre-determined file path. So I think I need to index to a folder (for holding the images) in Finder to maintain a fixed file path for convenience - if I use html-style link.

(3) I only have a few databases, but I would like to use the same file path to reference to all image links that I use for md files in DT.

As far as the type images is concern, it is just screen capture of table or graph from pdf files, by using shift-cmd-4, into md.

I found that this seems to create an issue to me when:
we index a folder in DB “A”
we index the same folder in DB “B”
in “B” we run a script based on a rule on import.
is it possible that the devonthink recordid changes and therefore the script is “re-executed”?

If you index the same folder in two different databases, each has its own unique ID. However, changes you make to the file in one database will obviously change in the other since they’re both pointing at the same location.

then if I index iCloud, to ensure consistency I cannot index a subfolder of iCloud in a different DB to run that other db’s rules.
It’s not a critique - but I used the built-in iCloud indexing script so my question is, can I change the way I index iCloud, indexing its (sub)folders one by one? or something bad will happen for some reason to the iCloud sync?

sorry to stress an answer to this but one of the “double-indexed” folders is actually sending stuff to another application so I need to clean up some duplicates every morning. is it ok to sync iCloud as a normal set of folders or we need to use the provided script?

You can use File > Index Files and Folders with a folder in iCloud Drive.

thanks and sorry for being pushy, best support ever!

No worries and thanks! :slight_smile:

It is a powerful feature of DT. With this feature you can physically have one file, but indexing it to different databases (or to different locations of one database) you may have different sets of metadata (except Finder comments and some other), including your own custom metadata. This means that the same file may have very different uses and play its roles in multiple databases/locations changing its content according to it, but having all these changes in one place.