Question about old Synchronize.scpt vs. new Index command

When using indexed files import, I originally set 100 of these up when the Synchronize.scpt lived in Extras/Scripts/Examples.

Then it moved to Extras/Scripts/Triggered

In current DTPO it does not seem to exist anymore at all and it’s become the Files >> Index command, which works the same way and instead of a script attached, the folders and sub-folders have that grey arrow icon to the right, showing the files are outside of DTPO.

Everything seems to be working just fine, so my question is, is DTPO smart enough that when it finds an old Synchronize.scpt attached to a folder, it just converts it to whatever the new format is for synchronizing that folders and sub-folders? It seems to be. Everything is working as expected, I’m just verifying that this is correct and I don’t need to manually search for the 100s of instances I have of the old Synchronize.scpt, and manually replaced them with the Files >> Index command.

And a 2ndary question: so what would happen if I just made a normal group and attached the Synchronize.scpt to it, will DTPO automatically turn this into the same thing as Files >> Index?

Thanks.

The menu ‘File>Index…’ command has been around for a long time, as folders had to be first indexed into a database before they could ever be synced using the Synchronize script. In other words, the File>Index… command would get the groups indexed and the Synchronize.scpt would keep the index current. What you do get beginning with DEVONthink 2.6 is that selecting an indexed group updates the group and its contents automatically, same as what the triggered Synchronize.scpt used to do.

DEVONthink now ignores the synchronize command in triggered scripts, so you don’t need to do anything, although you could remove the triggered script from the group. As mentioned earlier, you will need to use the File>Index… command to add new, indexed groups to your database(s).

No, nothing will happen if you attach the Synchronize.scpt to a group that is not indexed. This was also the case prior to 2.6, when the Synchronize.scpt actually did sync indexed groups. Ditch the Synchronize.scpt as it now has zero functionality.

As a side note, I wrote a post last year about accessing and editing indexed documents that may also be useful to you, if you haven’t seen it already:

The following script will locate all attached scripts in the selected database and place a report into the inbox that database that lists which scripts were attached to groups and the name of the group.

Optionally (by default) the script will locate instances of the now mainly-obsolete “Syncrhonize.scpt” script and remove it from groups that had formerly had that script. The report mentioned above is helpful if you want to unwind the deletions, but that should not be necessary.

Use at your own risk.

(*
This script surveys all groups in the selected database, and
returns a text file (in the incoming group of that database), which
shows the groups with attached scripts and the path of that script

If the property "remove_Synchronized" is true then the
script will also remove all instances of groups that have the
now-obsolete (from v2.6.x) "Synchronize.scpt" script attached.
*)

property remove_Synchronized : true

tell application id "DNtp"
	set theDatabase to current database
	set theRecords to (children of root of theDatabase)
	
	show progress indicator "Finding attached scripts"
	set full_listing to my createListing(theRecords, "")
	hide progress indicator
	
	
	set reportName to the name of theDatabase & ": Groups with attached scripts as of " & (current date)
	set theInbox to the incoming group of theDatabase
	set theResult to create record with {name:reportName, plain text:full_listing, type:text} in theInbox
	
end tell

on createListing(theseRecords, theTabs)
	local this_record, this_type, this_listing, this_name
	tell application id "DNtp"
		set this_listing to ""
		repeat with this_record in theseRecords
			set this_type to type of this_record
			if this_type is group then
				
				set this_name to the name of this_record
				set this_script to the attached script of this_record
				
				if this_script is not "" then
					set this_entry to theTabs & "In: " & this_name & return & theTabs & this_script & return & return
					set this_listing to this_listing & this_entry
					-- display dialog this_listing
					if remove_Synchronized then
						if this_script contains "Synchronize.scpt" then
							set the attached script of this_record to ""
						end if
					end if
				end if
				step progress indicator this_name
				set this_listing to this_listing & my createListing(children of this_record, theTabs & (ASCII character 9))
			end if
		end repeat
	end tell
	
	return this_listing
end createListing


Thanks very much for the demystification. I made my indexed groups so many years ago that I forgot how I made the original ones, I guess the index files command was always there and it’s only attaching the Synchronize.scpt that is now done automatically.

Thanks Korm for your script, it worked a treat! All cruft removed, no damage done :smiley: