Ferdinands Version Locator Script
From ptWiki
By Ferdinand Paris (Ferdinand_Paris)
Ferdinand's Version Locator Script
Version 1.0 - 30 November 2008
PLEASE ALWAYS TEST THIS SCRIPT FIRST ON A TEST DATABASE OF TEST IMAGES
DESCRIPTION

This script will search the database for matching versions of an image or images, assign all the identified versions to a category, and display that category.
Given the various ways in which different versions of an image can be linked, I have constructed three ways of identifying matching images. Please test this script first on a test database of test images, to ensure that you understand how the matching algorithms work in your DB.
The two options based on file name are fastest by far. Simply taking a specified extract of the filename is fastest, although in my own naming scheme the length of the "trunk" in the file name can vary, so I don't use this option.
I find the option to apply a regular expression to the file name more precise, and it's nearly as fast as using the filename extract option, but you need to understand regular expressions. My image naming scheme is 20061225_12h32m34s_d300_1234_xxxx.jpg, and the default regular expression will extract the d300_1234.
The property-based option assumes you have an iMatch property which contains a unique versioning identifier which can be used to find other versions. In my case it contains d300_1234. It could also be the original date and time of the image, provided that that guarantees uniqueness. However this option really is a lot slower - around 3 to 4 times slower - even in Imatch 3.6.
Note that this script does not directly access EXIF metadata, so that it won't directly access date and time for a match. Why not? It's too slow! Rather the script assumes that date and time are either in the filename or an iMatch property. If so, then you can match on date and time stored in either of these locations.
The matching versions located by the script are placed in the specified category. In the script dialog you can either browse for an existing category or type in the name of a new one, which will be created. Note that this category will be emptied at the start of each script run, so don't select a category that you use for something else.
You can search for matching versions for more than one image. All matches for all specified images will be assigned to the same category.
All settings are saved as defaults for the next run.
REVISION HISTORY
V1.0 - 30 November 2008
F_P
* Script file: Download this script
* See the Script downloading and installation instructions for generic information about using scripts downloaded from the IMatch Wiki.