Where is metadata stored?

I’m creating a new custom metadata field, which will be used mostly for indexed Markdown files, and it occurred to me that I don’t know where the metadata is stored–in the file itself, or in a central database file?

In other words, would it be possible to see this bit of metadata outside of Devonthink?

In the .dtbase2 database file

In other words, would it be possible to see this bit of metadata outside of Devonthink?

No
Also, I’m unable to see custom metadata in DTTG

It’s possible if you script your own way to sync information between markdown front matter and custom meta data field in DT.

Two use cases for me are Budgeting and Task List
I use an applescript to export the data to a spreadsheet

There is no format/platform-agnostic standard for arbitrary metadata, so no, custom metadata isn’t directly accessible in the filesystem or when exporting documents. It will eventually become available in DEVONthink To Go, but that is a project for another day.

Custom metadata is stored internally but importing reads & exporting writes also an extended filesystem attribute so that the custom metadata won’t get lost.

These file system attributes are limited to Apple‘s systems, I think. So, they’ll not be transferred if the file is send via email or copied to (eg) a USB stick with another file system.
Not necessarily a disadvantage, but one should keep that in mind.

In that case zipping the files would retain the attributes.

And if you unzip that on a non-APFS system, is the metadata available there, say on NTFS (or whatever Windows‘ file system is)?

Of course not but I wouldn’t recommend such filesystems on a Mac anyway or at least people should be aware of their disadvantages. And on Windows it doesn’t matter because there’s no DEVONthink :wink:

I just wanted to point out that file system metadata (extended attributes) are stored outside the files and thus not part of them (in general – things are different for ECIF/IPTC, for example). If moved to another, non Apple system, they will not be transferred. People should be aware of that.
If everything remains in the Appleverse, metadata will be preserved, of course.

Well thanks, I didn’t know about the Markdown front matter. That’s pretty cool. Is there a way to have DT read a field from the front matter, and put it into a custom metadata field?

This older thread might help:

1 Like

Thank you, that is helpful.

I’m having a research assistant create notes (in markdown txt files) on a series of academic papers.

I’d like a way for the RA to insert, in the note file, the date that the original paper was published, in such a way that I can sort the notes chronologically in DT by those dates. So I created a custom metadata field for the original publication dates but it sounds like there’s no way for DT to figure out what should go in that field from the contents of the file itself.

The notes are in a folder that’s indexed to DT, but the RA does not have access to DT, just the files. I haven’t sprung for server edition yet, but maybe that is the answer.

I would use a smart rule and applescript
The script can easily identify the date and update the metadata

1 Like

Time to learn AppleScript!

1 Like

The Server edition could be useful in providing access to the assistant, but provides no advantage regarding the metadata and file contents.

1 Like