Syncing Indexed files question

OK, thanks.

Are you saying that as well as there being no in-built feature (which is fine), one couldn’t write an AppleScript to run at regular intervals to update the relevant folders and therefore reduce the problem? Is it technically impossible, or it is just there hasn’t been a need for it yet and it hasn’t been written?

(I’m perfectly fine with the latter of course, and I’m not asking anyone to write the script… I’m just trying to understand the problem.)

Cheers.

That’s possible by using third-party tools as DEVONthink Pro (Office) doesn’t support scheduled execution of scripts. But an upcoming release will support this and also improve the filesystem integration, therefore as long as your Mac is up & running, the Dropbox index should be automatically updated then.

3 Likes

Sounds like great news! Thanks in advance to the DT team.

I have something semi-automatic working such that this is rarely a problem for me. I set it up via Hazel a long time ago with poor documentation, so I actually can’t even remember how it works or what it really does. :upside_down_face:

I won’t have time to investigate for a while but if I get the chance to figure out what I’ve done, I’ll post it here. For now know that you can use Hazel or similar tools to trigger indexing when new files are added. Sorry that this isn’t more helpful!

That’s great - thanks, Christian.

I presume by third party tools you mean things like Hazel (as Ryan suggests) or a cron job?

Criss was indeed referring to options like that. :slight_smile:

Great - thanks, all.

I use Keyboard Maestro to launch the following DTPO Apple Script when it detects my Mac has been idle for 10 minutes and DTPO is running. This keeps my three databases updated that index various folders from OneDrive, Dropbox, and Box.

~/Library/Application Support/DEVONthink Pro 2/Scripts/Data/Update indexed items of all databases.scpt

5 Likes

Thank you very much – this fits perfectly.

I already use Keyboard Maestro for just about everything, so it would have been part of the solution anyway. My difficulty was working out how to update the indexed files using DTPO. I looked for an existing script in the script folder under ‘Index’ and didn’t see anything, so I tried to write my own and got nowhere. Didn’t think to look under ‘Data’…

So, all done and tested – many thanks again!

David

This was a very helpful tip, thanks! Here’s a screenshot of my Hazel rule that does what you described. It just runs the Update indexed items of all databases.scpt script that available via Help -> Support Assistant -> Install Extras -> Update indexed items script, which shows up in ~/Library/Application Support/DEVONthink Pro 2/Scripts/Data as mentioned elsewhere.

1 Like

Are you guys able to upload that particular script?
I can’t seem to find it. Strange. v2.11

It’s under Scripts > More Scripts on the second page…

I’m making a move to go with indexed files and, though not using Dropbox, my DT database will be fully dependent on indexed files from my Finder and File System. I use DTTG regularly in editing files (mostly Rich Text) and also creating new ones. My sync takes place over my local network when my devices are home. I’m wondering how to have DTTG send those newly created notes over to my Mac File System and change them to indexed as all the others.

I think I found my answer in a post elsewhere by Greg_Jones here:

It is correct-documents in an indexed folder in the Finder will auto-update in DEVONthink, but documents created in DEVONthink in an indexed group will not automatically be exported out of the database to the indexed folder in the Finder. The thinking here is that you may want to mix documents in an indexed group-say index PDFs that you want available to other apps while keeping annotation documents in the same group, but available only from DEVONthink.

You can somewhat automate 2-way sync by attaching a triggered script to the group in DEVONthink.

on triggered(theRecord)
	try
		tell application id "com.devon-technologies.thinkpro2"
			deconsolidate record theRecord
		end tell
	end try
end triggered

When you attach this script to indexed groups in DEVONthink, selecting the group (to activate the trigger) will export all database documents (and sub-groups) in the group out to the Finder.

Version 3 (public beta now available) does this.

What Criss said. There is a lot of information here on indexing documents in version 2 that will not apply to version 3, as the behavior of indexed folders and documents is considerably different now. Indexed groups, and their contents, behave nearly identically to folders and their contents in the Finder.

2 Likes

If I select “Download Always” in the DTTG prefs (Info), does that mean that all files will be downloaded onto my device whenever I’m on the same network?

In the sync locations settings, you should be able to select options that download the entire database. You can also do this per group. See the Always vs On Demand setting in group info:

Thanks. I had found that earlier. Exactly what I’m looking for.

does that mean that all files will be downloaded onto my device whenever I’m on the same network?

It isn’t relative to being on the same network unless you were using a Bonjour sync.

Download Files: Always just tells DEVONthink To Go to import metadata AND contents of the files.
Download Files: On demand imports just the metadata and allows you to download the contents of individual files or groups as needed.

I think my thread here DTTG sync with DT 3.0 beta is lining up with some of the questions the original poster has here.