Synchronize a specific named Group

Hi - I have a Finder folder that is indexed into DTPO as Group “Notorium Notes” in database “testing”. I want to Synchronize regularly using launchd. I’ve tried in both Automator and Applescript and am not having any luck.

The Automator script:

Get Specified Records - Name is Notorium Notes. I dragged the folder from DTPO to the action to make sure the name was correct.

Synchronize Records

The workflow runs fine inside of Automator but does not run when saved as an application either from the Finder or the DTPO script menu.

BTW - the Index folder action won’t work because Notorium Notes has several sub folders where new files are going.

With Applescript, taking from the Synchronize script:

tell application id “com.devon-technologies.thinkpro2”
synchronize record [ I don’t know how to refer to a specific group by name]

end tell

Any suggestions on either of these?

thanks!

Chris
end tell

Here are two AppleScript examples:


tell application "DEVONthink Pro"
	-- Slower
	set theDB to database named "testing"
	set theGroup to parent named "Notorium Notes" in theDB
	synchronize record theGroup
end tell

tell application "DEVONthink Pro"
	-- Much faster
	set theDB to database named "testing"
	set theGroup to get record at "/Notorium Notes" in theDB
	synchronize record theGroup
end tell

Another possibility is to simply attach the Synchronize.scpt script, see viewtopic.php?f=20&t=12601

Thanks so much!!

That Applescript worked like a charm.

Is it fair to assume that you can add subfolders as well?


set theGroup to get record at "/Notorium Notes[b]/subfolder/subfolder[/b]" in theDB

Any idea why the Automator workflow won’t work as an application? I can kinda fake my way through Applescript but Automator is much more my speed.

As for attaching a script to a Group you mentioned in the other message… it won’t work for what I am doing here but it is a very cool thing to know is possible.

Thanks Again!

Chris

That’s of course possible too. Please note that the character / has to be replaced with / if necessary, e.g. a group named “A/B” would be “A/B”.

That’s hard to tell without having access to the workflow. Has been anything logged to the system console?