Through my workflow, I need to share a some folders with a colleague on Dropbox (she’s working on a PC) - so have taken these out of Devonthink and indexed them.
The synchronize script works pretty well but I’ve a few questions relating to what I can and can’t do that don’t seem to be very clearly explained in the help info. Sorry if they’ve been covered here but I did have a look. Mostly they’re relating to the nature of the index/sync:
Files added to the ‘indexed’ folders in Devonthink don’t get synchronized/indexed back to the Finder folder.
Files moved from one folder to another in Devonthink in the indexed folders don’t get synchronized/indexed back to the Finder folder.
Files deleted in Devonthink do not get replaced once the index has been done - and the deletion doesn’t occur in the Finder folder.
What changes made in Devonthink are reflected in the Finder folder? So far I can work out that it is text editing, Spotlight notes and a few others.
Here is a modified synchronize script that korm created to do just that. Attach it to the indexed groups just as you would with the Synchronize script.
tell application id "com.devon-technologies.thinkpro2"
deconsolidate record theRecord
synchronize record theRecord
Correct, and I suspect that’s a good thing. It allows you to move documents to a more logical location in the database without disrupting the Finder organization. As example, I index some iTunes podcasts folders and I want to organize the documents differently in the database, but the documents must remain in the same Finder location to work in iTunes. Also, if you move the documents from an indexed group to a non-indexed group in the database, then the documents would be imported instead of indexed.
When I do want to move the documents into another indexed group in the database and also move them in the Finder, I right-click on the documents and select ‘Move into database’, perform the move, and sync using the above script. The documents are then also moved in the Finder. Also it is worth noting that this discussion concerns the syncing of the document’s location-not changes to the document content. All changes of content will be reflected in the document in the Finder, regardless of where the document has been moved to in the database.
I’m not sure what you mean by ‘do not get replaced’, but if you delete indexed documents in the database, you’ll get a prompt asking if you also want to delete the documents in the Finder. Click on ‘Files and Folders’ to delete the Finder copies.
The only change that I have found that is not automatically reflected in the Finder are Openmeta tags. If you change the tags associated with a document, the changes will not be reflected in the Finder unless you perform a ‘Move into database’ and then export them back out with ‘Move to external folder’.
Greg - thanks for that very complete and helpful reply - I’m almost there with the workflow.
I’m trying to get it so I’m able to minimize the amount of toing and froing between Finder and DT - so with this help (and probably a little working out in my head) - I’m almost there!
So, regarding my questions:
That script just works perfectly - that’s really all I needed. Just attach to the parent folder and bang! it’s done.
So some of this is about processing invoices and delivery (dispatch) notes - I have some come in and put the processed documents into a different folder. I want DT to know which documents have been processed - ie moved into different folders. Probably your answer to question number 3 is the best workaround to this:
I guess rather than moving them - I replicate the files into the appropriate folders and then delete them in the synced folders.
By replacing, I meant that when you delete a file in Devonthink and it (apparently) doesn’t get deleted from the Finder folder (which I now know that it does), and the next sync/index sees the folder without the (deleted) file in DT and adds it again.
Just gave that a try - and that does seem to do the trick. So does the ‘move into database’ mean that any file undergoing this:
Is then replicated between the database and the Finder folder if copied into a synced folder?
Is taken out of the Finder folder entirely if moved from a synced folder to a non-synced folder?
Here are a couple of additional thoughts that may/may not address your remaining questions. Indexing works in a pretty predictable manner, with a couple of twists. If this does not answer your questions, let me know and I will try harder!
If you index a document into the database, that document remains in the Finder, at its original location, unless you specifically delete it or move it.
If you replicate an indexed document to other groups in the database (indexed or not) and delete the document from its original group, it will still be in its original location in the Finder. As example, let’s say you:
index a folder named ‘FinderFolderA’ into the database
replicate a document from that group in the database into other groups
delete that occurrence of the replicant from the database group ‘FinderFolderA’
The document will still remain in the Finder folder ‘FinderFolderA’, as the document still has other replicants in the database. Now the one really confusing part about this is the fact that when you empty the trash in DEVONthink, you will get the warning dialog I posted above, even though in this example the Finder copy will not be deleted. It is only when the last occurrence of a replicant is deleted that it can also be deleted from disk.
If you replicate a document from one indexed folder to another indexed folder in the database, the document will only appear in the Finder, in the original location where it was indexed from. The Finder has no comparable concept of replicants, and even though some use original/alias as an example-the two are not the same. Because of this, you cannot use replicants in the database if you also want the database to 100% mirror the Finder folder structure.
Moving an indexed document from an indexed group to a non-indexed group does not remove it out of the Finder folder, unless you also execute the command to move the document into the database. If you ever have a question about exactly where an indexed document appears in the Finder, right-click on the document and choose ‘Reveal in Finder’. This command can also be useful as you experiment with indexed documents to confirm that everything is working as you expect it to work.