Automatic move to external folder?

edit: see the corrected posting and script two items below this one

I’ve tried that edit to the script before, and it never worked for me. I have some thoughts on how I work around the lag times, but I’ll wait to see if there is a scripting solution before posting them as they may become irrelevant.

My apologies. I lazily posted the wrong script. This one works, and also checks to be sure the selected item is a group.


try
	tell application id "com.devon-technologies.thinkpro2"
		set theRecord to the first item of (the selection as list)
		if the kind of theRecord is not "Group" then error "Please select a group"
		deconsolidate record theRecord
		synchronize record theRecord
	end tell
on error errorMessage
	display dialog errorMessage
end try

Open AppleScript Editor. Compile. Save the Script to a folder in ~/Library/Application Support/DEVONthink Pro 2/Scripts. Update the scripts menu in DEVONthink. You’ll be good to go, then. Make sure you use this when selecting a group (not a document).

[size=85]Update Dec 21, 2012: the script operates on all the child groups of the group selected when you run the script. If you do NOT want this to happen, then you will need to select the groups against which you wish to run the script one by one.[/size]

Works like a charm! 8)

Whew! Thanks for catching the error :blush:

Best ways to use this script include

  1. Put the script into ~/Library/Application Support/DEVONthink Pro 2/Scripts/Toolbar (it must be this folder). Refresh DEVONthink’s script list. Open View > Customize Toolbar… From the customization palette, drag the script to your toolbar. It’s now a clickable tool.
  2. Put the script into QuickKeys or Keyboard Maestro or Alfred
  3. If the script is in DEVONthink’s Scripts folders somewhere, then name it something like “Move External___Cmd-Shift-Alt-E.scpt”. (Note: you must precede the key names with three underscore characters.) Refresh the scripts menu. You’ll now have a keyboard shortcut for the script. Valid names for modifier keys are “Cmd”, “Shift”, “Alt”, “Ctrl”, “Opt”. Such script shortcuts work only in DEVONthink.

As an additional use suggestion, one might want to try attaching the Synchronize script that ships with DEVONthink to the group, then use this script periodically to export any database-contained documents in the group out to the Finder. The Synchronize script doesn’t have as much resource drag (because it doesn’t do as much), and will make sure that all documents added to folders in the Finder are automatically added to the group when selected. I have a few groups that I am going to setup like this (most of my indexed groups are still quite responsive with the full-sync script attached).

The sync and deconsolidate script is no longer working for me. Sorry to be vague but how should I proceed to troubleshoot. I have verified the script is still being point to by DTpro.

As for me.
The trigger script attached to a group work
But the script from the script Menu always ask to select the group.
Is there a fix?

Is there a Solution?

It doesnt work with DTP pro 2.8.3.
Please help.

Hello,
any news on this? I haven’t been using DT for some time and now I’m coming back. The post is quite old and maybe something changed in the meanwhile.
My question is: which script make it possible to have a perfect ‘mirroring’ of indexed finder folder and groups in DT? I mean: for my “personal” database indexing is the solution (as I need files to be accesible from the finder, but only if only if any kind of changes made in the finder are reflected in DT and viceversa (folder structure, files created in DT and moved outside, files moved in DT groups and moved in folder structure…)
Thanks for any hint
Nestor :slight_smile:

Indexed files in a database can be in a different group than in the Finder folder. This is by design. So if you want changes to be shown in the database, you should do any reorganization in the Finder, then update the indexed location in DEVONthink.

If you have reorganized in DEVONthink, the record will not move when you update the indexed items.