Another Versioning Example (find all variants of a file regardless of ext.)

Started by Darius1968, September 22, 2013, 12:27:14 AM

Previous topic - Next topic

Darius1968

Say, for example, I have a collection of 115 jpeg images in my database (probably in some Windows folder).  I do some editing on some of these images (crops, brightness/color adjustments, etc.), and these edits are now discrete files containing the same original filename (just, maybe, a variation of the same filename and/or different file types (tiff, png)). 
Up until now, I've been consolidating these derivative images by using stacking, which is fine, but I don't want to have to manually do a search on filename to give me my set of images to stack.  So, it appears that versioning is the automated way to go about this.  What would be the correct syntax to get this done, and cane it stack the images for me?
Modify message

Mario

IMatch ships with a number of default version relations, and the help file contains a number of tips how to configure versioning for different setups.
Did you try this already?

You need to know answers to these questions to start:

Where are my versions located (same folder as the original, sub-folder, ...?)
How is the name of the version derived from the master file name (same name but different extension? Same name, but with some characters appended?

If you have this info, you can just setup the regular expression which tells IMatch how to find your master files, and the expression which tells it how to find the matching versions and where.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ChrisMatch

Hi

Normally you would just add the extensions you need to the 'list' at the end of the expression.
But if you really want to match any ext. you could just use the standard expression
and exchange the content of the last brace with .*
  ^(_*{name})[+\-_]*[0-9|a-z]*\.(.*)$


Mario

These complex regular expressions make file relations look a bit complicated. But frankly, it's quite easy, unless you use complex naming schemes to name your versions.

The simplest expressions are (assuming your master files are .NEF files, and the versions have the same name as the master, but the extension .JPG):

\.nef$

for the master, and

{name}\.jpg$

for the version. That's all that's needed to match image.NEF to the version image.jpg.

If you append arbitrary characters to the version file name, e.g. image_web.jpg, or image_123.jpg you can handle all that in the version regular expression by changing it to:

{name}.*\.jpg$

The more complex regular expressions used in the defaults try to match the version file name as closely and as controlled as possible to the master name, to avoid matching the wrong files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook