Version stacking with a suffix in Photolab

Started by Stefanjan, September 15, 2021, 06:18:08 PM

Previous topic - Next topic

Stefanjan

I would like to be able to identify final jpeg versions and other types of jpegs versions within IMatch after exporting from Photolab.

I thought I could achieve this by adding a suffix like #f (meaning final) or #w (meaning web). This would then allow me to create a filter to view say 4 star final versions in database and exclude all other versions.

I would like to keep this as simple as possible and not use sub folders..

If I export from Photolab from the RAW file and and a virtual copy of the RAW with the Photolab suffix field blank I get the following files in IMATCH:

IMG_4945.CR2
IMG_4945.jpg
IMG_4945_1.jpg

These files version stack fine with my relations rules.

But if I add a suffix in Photolab #f then I get the following files in IMatch:

IMG_4945.CR2
IMG_4945#f.jpg
IMG_4945#f_1.jpg

These files don't version stack.

The relationship rules I am using are:

\.(cr3|cr2|nef|rw2|raf|srw|arw)$
/^_*//
^(_*{name})[+\-_]*[0-9|a-z]*\.(jpg|jpeg|tif|tiff|afphoto|psd|heic)$

Is there a way I could change this rule to make this work or is there another way of achieving the same objective?


Mario

Just change the version pattern to allow for the # you add in your software?
The standard version mask you use has

[0-9|a-z|]*

Which means allow for any combination of 0-9,a-z. But not for _ or # you now include in your version file names.
Just add them:

[0-9|a-z|#_]*

and test it with the built-in test feature in the File Relations dialog box. Should work just fine.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rienvanham

Note that in square brackets (for regex) the pipe doesn't have the meaning of "or" but it is literal a character. So the correct syntax (for regex) is [0-9a-z#_].

Stefanjan

Quote from: Mario on September 15, 2021, 06:34:25 PM
Just change the version pattern
Thanks Mario, that worked perfectly.

In case another newbie comes across this thread:

I created a category based on #f in file name using formula "@FileRegExp[#f]"
and as I wanted it to be available based on the selection in the file window, I created a filter based on this category and added it to the filter manager.

Stefanjan

Quote from: rienvanham on September 16, 2021, 08:50:39 AM
So the correct syntax (for regex) is [0-9a-z#_].
Thanks, I was wondering why it was #_ and not #|_ in [0-9|a-z|#_] your version works and I now understand the logic.

Mario

See also Regular Expressions which explains the most frequent regular expressions and has pointers to good regexp info online.

a-z just means everything from "a to z" and the | separates multiple possible groups in the (), e.g. (a-z|0-9)

Regular Expressions may be challenging at times, but they are very logical and super-powerful.
Many of the file-naming schemes users come up with would be impossible to handle with simple wildcards like * or ? as used by Windows.
For users with standard file naming schemes, the IMatch defaults work out-of-the-box. All others can make their proprietary file naming schemes work with a regexp.

From experience, it's always better to keep things simple.
Even if IMatch can handle this, most other software you use or will use in the future might not.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook