Return to Digital Photography Articles

IMatch Versioning - ManageVersions Script

As there is currently no native support for versioning in IMatch, I have written the Manage Versions script to work around this.

How to add Multi-Version support to IMatch

As most digital photographers typically perform some degree of post-processing or editing of the images after importing, one often ends up with several file versions of the same image in the catalog. Generally, the original image is left intact, and multiple copies are generated.

Unfortunately, most catalog programs treat each file as a seperate image, and do not recognize multiple files as being spawned from a single original. The net result is that when tags are applied to the multiple versions, the tags are associated with each file individually. This means that if the user wanted to apply a tag, such as location, to the photo, the location tag would have to be applied manually to all versions of the same photo. This can result in a lot of headaches.

It is fairly well accepted that the "next" version of IMatch (this feature has been promised for years!) will probably offer some sort of solution to the "versioning" issue. But until that version is released, it is worth using a script to automate some of this task.

I wrote the following script to automatically synchronize all categories and properties between an original image and the "edited" (derived) versions of the same iamge. This is done by careful use of file naming conventions.

Manage Versions IMatch Script

Please see the documentation included in the ZIP file below.

Download Manage Versions 2.3.4 (462 downloads).

See the Documentation for IMatch Manage Versions script here.

Version History

  • ManageVersions 2.3.4 [07/22/2007]
    • Updated for IMatch 3.6
    • Minor error checks added
  • ManageVersions 2.3.3 [01/10/2007]
    • Fixed property copying in forced mode.
  • ManageVersions 2.3.1 [10/24/2006]
    • More robust handling of offline images for interactive mode.
  • ManageVersions 2.3 [10/15/2006]
    • Marking originals can occur anywhere in database. Even if original is not included in the selection and selection mode is used, the originals will still be tagged.
    • Marking of originals is only done if derived version exists.
    • Edit category is excluded from category comparison.
    • Browse dialog for report file location.

Find Versions IMatch Script

Note that this is a beta, and so the documentation is currently very limited!

Find Versions is designed to quickly locate all original and derived versions of an image within your database. Simply select an image, run the script and then the original & derived images will all be bookmarked for easy location (simply go to "Selection" View and then "My Bookmarks". If you have changed your suffix character (from -), then open up the script and change SUFFIX_CH). This script is primarily useful for those who do not keep the original and derived versions of a photo in the same folder.

Download Find Versions 0.1.1 (192 downloads). (Released 03/03/2006)

 


Reader's Comments:

Please leave your comments or suggestions below!
2009-12-02Stephen
 Calvin,
Does the script support raw on DiskA and modified on
DiskB using "Search and Replace" where the directory structure below the root is the same on both disks? I want to store the raw files on a separate disk so it can fill without saving space on it for modified files. Once the raw disk is filled I would no longer need to retrieve the off-site backup disks to sync them. Your examples only show root files on the same disk.
Thanks
 Hi Stephen -- it's been a while since I've worked on the script. However, I believe the script may still work with your setup, provided you use the "Search Anywhere in Database" option. The script doesn't directly support the largely different directory structure (you could modify it, though), but the "Search Anywhere" should get around that, but operates slower. Good luck.
2008-10-13caba
 Hi Cal,

any plans for the new version of the script? Syncing XMP would be great... :-)
 Hi Caba -- Unfortunately I have several other commitments right now that occupy much of my time so I don't foresee a new release of the script for a while. I am certainly open to others taking the script and enhancing it if you feel that the XMP sync is not too difficult. I haven't used XMP enough in my own workflow to feel comfortable understanding all of the nuances and test it effectively.
2007-09-26Arved
 Thanks Calvin.

Nobody mentions anything but the problems with the script, but the latest version seems to work perfectly. This is a real asset to the IMatch community. I really appreciate the effort you've made to address this feature, long promised and well overdue by the IMatch developer.

Warmest regards,
- Arved
 Thanks Arved -- it's very much appreciated!
2007-07-13Alex
 Calvin,

thanks! But unfortunately it doesn't work. It seems to me, that IMatch 3.6.40 somehow isn't able to expand/interpret "ScriptFolder", but that's just a hunch. Problem is, that I'm not able to calculate any value for "Application.GetApplicationVariable("ScriptFolder")", not just a wrong value (e.g. that "ScriptFolder" points to the wrong directory).

The same error occurs even on a freshly installed machine. Fresh Win XP and no previous IMatch version but 3.6.40.

I'm not really a programmer, but I figure, that a new script which contains nothing but the following two lines should display a message box with a path name, right?

1 Const zzz as string = Application.GetApplicationVariable("ScriptFolder")
2 Msgbox zzz

Unfortunately it doesn't, but the script stops at line 1 with an error.

Do you have another idea as to what might cause this error or should I take this to the IMatch User Forum since it appears to be not specific to your "Manage Versions"?

Thanks again!

Alex
 UPDATE 07/22/2007: It seems that the new scripting environment in IMatch 3.6 is more stringent than that of version 3.5. This has caused a few scripts to fail on the db.GetImages() call and also in areas where constant values have been initialized with the return value of a function.

I have now uploaded Manage Versions 2.3.4, which should correct any issues for IMatch version 3.6.
2007-07-06Alex
 Hi Calvin,

is there an IMatch 3.6x compatible Version of your excellent versioning script? On my computer "Manage Versions 2.3.3" stops at the following line: "Const THUMBNAIL_NAME As String = Application.GetApplicationVariable("ScriptFolder") & "thumbnailtemp.bmp""
 Hi there -- I haven't had an opportunity to upgrade my installation yet, so I can't recreate the error, but it appears that version 3.6 of IMatch has broken some scripts in subtle ways. When you upgrade from 3.5 to 3.6, the "ScriptFolder" setting in IMatch didn't get updated (it's likely a bug in the IMatch upgrade process). One user found a way to get around it:

Application.GetApplicationVariable("ScriptFolder")

Now the problem was that despite the uninstall and reinstall, this folder was still set to be the old script folder from 3.5. You can see this because the script dialogue showed the folder where it has located preset templates, and in this case the list of templates was outdated.

I looked in options, and there was no place to reset this. But under general options, some folders can be reset, and I edited one of these. This resulted in the ScriptFolder variable also being reset. The script then finds the correct preset templates.

So I don't think that 3.6.0.36+ is resetting the script folder correctly, if 3.5 has been installed.
Let me know if that fixes it for you.
2007-06-26scott stone
 just used your iMatch "manage versions" script for the 100th plus time. just wanted to tell you how much i appreciate you putting it together. it works wonderfully and is a huge time saver.

many, many thanks for sharing it (long overdue!).
scott.
2007-04-30Carlos
 Thank you very much Calvin. Yesterday I tried to delete the "problematic" string, I ran the script and changed the number to "11", and it seemed to be OK. Now, reading your response, I have checked the *.txt and it was corretly modified to "11".
Thank you!
 Glad it worked out for you!
2007-04-29Carlos
 Hi Calvin, I'm trying to use "Manage Versions 2.3.3", but after some testing, I think I changed the "Prefix End Char" to nothing, and now the script does not work; I tried to remove it and download it again, but when I execute Imatch shows the "Sax Basic" application, with one yellow string, I don't know what it means; it says "error" on this string: PREFIX_LEN = CInt(param_val).
what can I do?
Thanks in advance,
Carlos.
 I should have had some additional error checking just in case bad values were entered into the configuration. The next release will warn you if you try to enter a bad value into one of the fields such as this.

In the meantime, this is easy to fix. The problem is that your configuration file currently has a bad setting in it (probably an empty PREFIX_LEN, when it should have a number). When you start the ManageVersions script it automatically tries to load your last configuration first, and this is why you are getting the error.

The fix should be easy: simply open up your ManageVersions configuration file (probably located in your IMatch Presets directory), named ManageVersions_Config.txt.

Look for the line that says:
PREFIX_LEN=
Enter a number after the equal sign, for example:
PREFIX_LEN=8

Resave the file and everything should be fine!
 
2007-04-18Elle
 I just ran your manage versioning script. I am just learning
how to use Photools. Your instructions were crystal clear. The dry run logs helped me straighten out some naming issues created by an application I don't use any more. Now my versions are in synch with my originals. You are wonderful and your script is wonderful. Thank you so very very much for making the script available.

By the way, I use Photools in large part based on information from your website. My naming strategy is also drawn from your website. Thank you so much for helping me organize my photographs before they got totally out of control.

Elle
2007-04-09Ech1965
 Hello,
Congratulations for your really usefull job !!!

I'm using your naming conventions( slightly adapted) they are really usefull,

I have a small issue:
- I have one category with my original ( .cr2 or .jpg without raw).
- When I shoot in RAW+JPEG, the jpeg is considered as derived.
- I have contents related categories ( places, persons,...)

- Before running your script, I would like to tag the original with content related categories but I would prefer not seeing the derived jpeg...

The question:
In IMatch, howcan I filter out all the derived images to only see the original when doing my tagging ???

Kind regards, and thanks in advance for your answer
 There are a few different ways to accomplish this, but one easy way:
  • 1. Go to Image->Apply Filters
  • 2. Under Categories, click on the checkbox beside the category you use for your Edited / Derived versions (e.g. State.Edit)
  • 3. Select Negate Filter (invert result) at the bottom of the dialog
  • 4. Under Saved Filters, enter in a name, such as Hide Derived and press Store.
  • 5. Click on OK.
From now on, when this filter is applied to your view, you will not see the derived versions, only your originals. You can click on the Apply Filter button on the toolbar to quickly switch between views.

If you do use this method, you may want to consider using a script that marks an original (with a different color) if it has derived versions. This way you can see if other versions exist even when the filter is applied. However, in your case shooting in RAW+JPEG mode will mean that everything has a derived version, so it may not be as useful.

As another completely different alternative, BenAW from the forum posted his approach, called VersionFinder.

Good luck!
2007-01-04Paul
 Just wanted to say thanks for sharing all this information with everyone. It really is helpful. Like anyone who has taken thousands of photos over the years I find it difficult to keep them organized while perserving the originals.
 Great to hear it!
2006-10-27Jose Santos
 Hi Calvin,

This is a category that exist in my IMatch database. It work well with other scripts, but not in Manage Versions. Thank for your help.
 [Update 11/01/06]: It turns out that the derived versions weren't being selected prior to running the script. Manage Versions requires that you select the derived files (if running in selection mode), not the original files.
2006-10-26Jose Santos
 Hello,

I have a problem with Manage Versions. I believe that it does not recognize the category “Andalucía Barroca 2007”. There are some limitation by the use of special characters (" í " in "Andalucía")?
 Hi Jose -- You're right... I have not tested it with special characters yet. I will try to determine how IMatch is supposed to handle other character sets. Can you tell me where you are entering this category? Does it appear in any of the Manage Versions configuration dialog box options, or is it simply a category that exists within your database? Thanks.
2006-10-15Joe Austin
 Calvin,

I am trying to use ManageVersions 2.2 to tag originals, for which I have jpeg versions, with a category titled 'Has JPG'.

I select my .jpg versions and run the script with 'tag original image' enabled, and the desired category specified, but no tag is made. The report says that all originals are being found but no tag of the original is being made (and in fact none is made)

I have tried this with copy categories enabled and disabled and, when enabled, the original categories are copied to the jpeg version, but the 'has jpeg' tag is not made either way.

All I am seeking to do is tag the originals with this 'Has JPG' category, I do not want to copy any other properties or categories.

What am I doing wrong?

Thanks for the help,
Joe.
 

Since you have the (version 2.2) script running in "Selection" mode, it was only going to change/update files that were included in the selection. The biggest clue to this is if the logfile entries listed with "Name=" (in Verbose mode) don't include your original files.

So, while the category copying may be configured to search the entire database (with Anywhere in Database) and it successfully locates the originals, because they are not included in the set that is allowed to undergo modifications by the script, no tagging is performed.

Since it would be awkward to manually include the originals in your selection prior to running the script, I have now rewritten the Mark Originals logic.

ManageVersions 2.3 can now be downloaded on this page.

The script can now modify the originals (adding the original category), even though they are not in your selection and you are running in "Selection" mode.

The intention of "Selection Mode" was to restrict the set of images that could be touched by the script, but this is a case where I think it would be more intuitive to add an exception for the marking of originals.

Thanks for the great feature request!

2006-10-12Charles
 OK, thanks for that. I had already found the new version on the photools scripting forum and it's worked perfectly. Cheers
 Glad it worked for you!
2006-10-12Charles
 Hi, When I run Manage Versions 2.1 against IMatch 3.5, the script engine appears to report an error. The line "finalbm.SaveFile(THUMBNAIL_NAME, imbfBMP24)" shows an error "Expecting an existing scalar var".
Thanks
 In version 3.5.0.16, Mario changed the scripting environment APIs so you'll need to run the newer version of ManageVersions (e.g. 2.2). For some reason I forgot to put the newer version on this page, so it's there now! Thanks!
2005-08-10Cal
 

Huh! I'm also a Cal married to a Sharon!

After trying several other approaches, I am implementing iMatch to manage my image files. I've tried your excellent versioning script and, although I'm almost there, it's not quite working as expected.

I use your naming conventions, for example: yyyymmdd-ImageName-001_v1.jpg. Typical folder arrangement is:

Event\
  RAW\
    20050810-Test-001.crw
  JPG\
    20050810-Test-001_v1.jpg
    20050810-Test-001_v2.jpg
  Project\
    20050810-Test-001.psd

The script is identifying 20050810-Test-001.jpg as the original and ignoring the .crw and .psd files.

I'm using MODE_FIND=3 and EXTENSIONS="crw,cr2,psd,jpg"

Thanks for you excellent contributions to the field. Also enjoyed you photos!

... Cal (also)

 

Hi Cal -- Quite a coincidence :)

I am going to have a closer look in the next couple days. I am in the process of reformatting and reinstalling everything so I won't be able to recreate it for another two days. I'll post here and email back when I've had a chance. Thx.

2005-02-03John Shore
 

Hello,

I have been using iMatch haphazardly (to learn it), but I am now planning my conventions and strategy for importing and then managing my collection.

Thank you for your comprehensive discussions on impulseadventure ? most helpful.

I like your naming conventions. In my case, it makes sense to have multiple suffixes. I'm thinking of d (developed from raw), e (general editing, normally without resizing), s (resizing/editing for web or email or digital displays), p (resizing/editing for print). This lends itself to multiple suffixes, like:

[original].cr2
[original]-d.tiff
[orignial]-d2.tiff
[original]-d2-e.tiff
[original]-d2-e-s2.jpg

My question is does your management script anticipate this? For example, this would (I think) require that the suffix in the last example be found as -d2-e-s2 and not -s2.

Thanks.

 

Thanks for the comments...

I realize that I should clarify my description file so that it indicates how the extensions are actually used. The Manage Versions script doesn't actually care what the suffix is, but rather whether or not one exists. It merely tries to determine if a file is an original (ie. it does not have a suffix) or an edited version (ie. it does have a suffix).

So, in your case, you're free to use just -s2 if you want (or -sd2, etc.). I have now made a slight modification to the script (for version 1.3.1) which allows you to use suffixes that indicate edit history (eg. -d2-e-s2) which is probably what you're after.

Hope that helps!

 


Leave a comment or suggestion for this page:

(Never Shown - Optional)
 

Visits!