Dragging group of RTFs from DTP to Scrivener


I am using DTP to organise groups of notes, which I then want to drag into the Scrivener Research Section. When I drag a group to my Desktop it creates a folder with all the RTFs in, but when I drag the group to Scrivener it just creates what looks like a text file which contains the name of the group (when I would like a folder with RTS in). Of course I could drag the folder to the desktop first and then into Scrivener, but as I will be doing this a lot, I am looking to get a better DTP to Scrivener workflow. I am not sure if the ‘issue’ I am experiencing is related to DTP or Scrivener, but would be interested to know if there is a way of getting this to work as I would like,



Nick, have you considered Scrivener 2.0 (now available as a free beta for the November 2010 NaNoWriMo period)? Scrivener now includes the ability to synchronize with an external folder. If you synchronize DTPO to the same folder, then you are exchanging files with Scrivener.

Hi Korm,

Yes, I am using Scrivener 2.0 and have been using the external folder to sync via dropbox to PlainText on the iPad, so I am familiar with this method. So how would I go about syncing say, a group with subgroups of research items in DTP (which have been imported into a database) with the Scrivener sync folder?


This is my method. First, I do not import the external folder that is synchronized with DTPO and Scrivener. I index it. (It is thus indexed by both applications and stands alone in Finder.)

Adding docs from Scrivener: If I put something in that folder from Scrivener, I use File > Synchronize in DTPO to update the indexed instance in DEVONthink.

Adding docs externally: If I put something in that folder from neither DTPO or Scrivener, then I synchronize in both apps.

Adding docs in DTPO : If I put something in that folder in DTPO, then I have to do a reverse synchronization in DTPO, and then syncrhonize the folder in Scrivener.

Reverse Synchronization: Because FIle > Synchronize in DTPO only works in one direction (from the Folder to DTPO), I wrote my own command. Put this script somewhere, give it a keystroke command, if you wish, and use it by selecting one or more non-indexed items in the indexed folder (say, an RTF file that you created inside DTPO), and running the script. The script will export the item to that folder then resync the folder to update the DTPO display. It will also delete the internal instance of the item from DTPO, but I’ve commented out that part because it cannot easily be undone. If you are satisfied that the script is operating safely, you can uncomment the indicated line.

-- Script to move an internal database item to the indexed folder where it should reside
-- Warning: use this script at your own risk
-- Losing your data is one of your own risks

tell application id "com.devon-technologies.thinkpro2"
	set theDatabase to current database
	set theGroup to current group
	set theSelection to selection
	set thePath to path of theGroup
	if theGroup is indexed then
		repeat with thisItem in theSelection
			if thisItem is not indexed then
				export record thisItem to thePath
				-- uncomment the following line when you are confident in this script, and want to have the script delete the internal item for you
				-- delete record thisItem
				display alert "Warning!" message "Use this script on non-indexed items" as warning
			end if
		end repeat
		synchronize record theGroup
		display alert "Warning!" message "Do not use this script on groups that are not indexed" as warning
	end if
end tell

Excellent. Thanks Korm. It would seem that we need DEVONthink to add bidirectional syncing with indexed folders and then we could use DTTG to sync with Scrivener.

DTTG will sync with an indexed folder now.

See also the entries in Keith’s blog at Literature and Latte for more on synching Scrivener.

Ah, yes, I can see this now. I was getting a bit confused from your earlier thread on Scrivener and DTP:


I have just indexed Scrivener sync folder in DTP, synched with DTTG, made changes to txt files in DTTG and the changes get synched back to Scrivener.

So, if I’ve got it right, the issue is with adding new files to an indexed folder in DTP or DTTG as currently DTP doesn’t sync these back to the indexed folder. So this is where your script posted above comes in.

Hopefully the good folk at DEVONtechnologies will add this feature. For now I think I’ll be sticking with PlainText syncing because of my need to add txt files from time to time. Though I may start using your scripting method to cut down on the number of Apps in use…

Just to add that as Scrivener 2.0 folder sync doesn’t support subfolders at present, this limits its usage for me in terms of getting research articles and notes in to Scrivener.

Until such a time as this is implemented it would probably work best for me to search for research items in DTP and drag quotes/notes in to Scrivener as required.

I will continue to use folder sync for the draft section of Scrivener, either using PlainText or your script with DTP. Hopefully the good folk at DTP will add the ability to sync newly created files in indexed folders back to Finder.

Thank you for pointing that out. I’ve changed my thinking on this, and have noted such in the linked thread.