How to make DT detect a change to the Finder comment made by an external app?

This is basically the converse of the other question I asked.

If I have a file in a DEVONthink database (one that is not an indexed file), and I write to the Finder comment from outside of DEVONthink (e.g., reveal the file in the Finder, open Get info on the file, write something in the comments), the change does not show up in DEVONthink. Is there a way to force DEVONthink to refresh or otherwise detect the change?

Does File > Update Indexed Items update the comment?

Note: digging around in the database’s internals is not something we suggest doing. Just a reminder to people.

As mentioned in the OP, the item is not indexed. But I tried it anyway, and it didn’t make a difference to the Finder comment.

But but … aren’t we are supposed to be able to edit files in external applications? I mean, there are multiple ways of opening a file in an external (to DEVONthink) application, so surely that doesn’t count as mucking around in the database’s internals?

If we expect external applications to be able to edit a file, IMHO it doesn’t seem unreasonable to expect that those external applications might change basic Finder metadata. (It would be unreasonable to expect DEVONthink to recognize changes to application-specific metadata, if an application added its own metadata fields, but the main metadata fields used by the Finder are reasonably common.)

I think ‘Open with…’ from within DT works differently then open something in Finder from outside of DT. In the first case, DT knows that you’re working with the file, in the second case it does not. I don’t know anything about the internals of DT, but I imagine that it keeps its own data structures that are possibly updated after an “Open with…” - “Save” cycle.

OK, that’s a reasonable idea. So I tried open with on a file where I changed the Finder comment in Dt, just to see if that action would cause DT to update the Finder comment. But alas, no, it does not seem to do that.

Yes you can edit files in external applications, via DEVONthink not by accessing the files in the database’s internal folders. DEVONthink should be used in the same way as the Finder regarding opening files in external applications.

  • Data > Open, double-click when Preferences > General > Interface > Double-click opens documents externally is enabled, or use the Open Externally toobar button to open in the default application
  • Data > Open With for non-default application choices

I mean, there are multiple ways of opening a file in an external (to DEVONthink) application, so surely that doesn’t count as mucking around in the database’s internals?

Yes, it would and again, we strongly suggest people don’t mess about in there.

I don’t understand. I’m already using “open with”, and opening a file in an external application. That’s exactly the second alternative you wrote above. When I look at the file path opened by the application, it’s some like

~/databases/projects.dtBase2/Files.noindex/md/c/test.md

When I save the changes in the external application, that’s the file that’s going to be modified. There’s nothing I can do about that.

Edit: hold on, I think I know what’s happened – we have a misunderstanding. When I wrote “multiple ways of opening a file in an external application”, the methods you describe are what I was talking about. I didn’t mean starting from outside a database and looking for files in there :slight_smile: . No no no, not doing that.

So, now that that’s clarified, going back to my original point, the issue is that when this file is open in another application, the external application might do something like change the Finder comments of the file. I’m asking for is a way to make DT take notice. (To be clear, these are not special application-specific metadata fields or anything like that. DT already pays attention to them, but doesn’t seem to do it when a file has been opened and edited in an external application.)

Good to know, especially as we have had people doing this. It’s especailly common with PathFinder users as it displays package files as regular folders. The Finder hides the contents better.