"move to" without using the mouse ?

my question:
how can I move something to another group in DT, just by using the keyboard?

My scenario: I import a couple of websites into DT, and then they of course are all in the top level of the hierarchy. So in order to tidy up, I have to put each of the web archives into the correct folder, and often I have to first look at a web archive, to see whats inside.

Okay, so I found the archive, I know were to put it, and I could completely rely on the keyboard until now. I can even select one or more web archives. Groovy.

But now suddenly, in order to actually move them, do I have to use the mouse?

I imagine some sort of workflow, like:
select the web archive, do something like
cmd-x (cut), move with the arrow keys to the right group, and then cmd-v (paste) it into that group.

I am currently starting to use DevonThink to organize my research. After figuring out a couple of things today, thanks to this forum, a small question remains:

I considered the following approach:
assign a keyboard shortcut to a menu entry with iKey. That wont work, because the menu has no “move to” entry.
Yes, I know there is such an entry in the context menu, when right clicking on the web archive, but I dont know how to access that with the keyboard.

I actually found out, that this behaviour probably is inspired form the mac finder, which can not cut and paste files…

Just save the following scripts as Cut___Cmd-Ctrl-X.scpt and Paste___Cmd-Ctrl-V.scpt in the folder ~/Library/Application Support/DEVONthink Pro. Then launch DEVONthink Pro and use Cmd-Ctrl-X and Cmd-Ctrl-V to move items around.

-- Cut
tell application "DEVONthink Pro"
		set theSelection to the selection
		if theSelection is not {} then
			set theGroup to create location "/Clipboard"
			repeat with theItem in theSelection
				if theItem is not equal to theGroup then move record theItem to theGroup
			end repeat
		end if
	end try
end tell

-- Paste
tell application "DEVONthink Pro"
		set theGroup to get record at "/Clipboard"
		set theSelection to children of theGroup
		if exists current group then
			set theTarget to current group
			set theTarget to root of current database
		end if
		repeat with theItem in theSelection
			move record theItem to theTarget
		end repeat
		delete record theGroup
	end try
end tell

I realize this is an old thread but the scripts still work in DTPro 2 and are very useful. However, the scripts only “cut” and “paste” items within the same database.

I’ve been attempting to modify the scripts to move items between different databases but have been unsuccessful.

Does anyone have suggestions for modifying the script to accommodate such functionality?


I answered your question here. It’s in a new thread because I took a different, single-script approach to the solution.

What a clearly and concisely written script. Thank you! :slight_smile: