Author Topic: Buddy Files and Versioning  (Read 1139 times)

mvkuilen

  • New Members
  • *
  • Posts: 20
Buddy Files and Versioning
« on: August 16, 2020, 12:37:38 AM »
Is there an expanded version of the online help for those that need a bit more handholding?  I need a translation of the master expression and link expressions. One) to understand what the existing ones mean and two) to possibly modifying or even building my own.

My immediate need is to have the versions of my raw files that DXO creates be associated with the original file. The various output files for different end uses are created in different subfolders and each output file usually has a suffix appended to the original file name.
ex:
raw folder: 2020-08-15.CR2
subfolder1: fullsize: 2020-08-15.jpg
subfolder2: jpg-1024: 2020-08-15-1024.jpg
subfolder3: tablet: 2020-08-15full.jpg

Is there a repository where various examples have been stored that could be reused?

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31552
Re: Buddy Files and Versioning
« Reply #1 on: August 16, 2020, 10:57:48 AM »
If you have selected CR2 in the startup assistant (when creating your database), IMatch should have created a buddy file rule for CR2.
Do you have this? Does it not work?

IMatch uses regular expressions to be able to handle all the various file naming schemes applications and users come up with.
While looking a bit scary at first, they are real problem solvers. The IMatch help as a dedicated section (Regular Expressions) which explains them. This help topic also has pointers to online resources and tools.

The default for CR2 is

Master Expression \.(cr2)$

This expression means "all file names ending with .cr2".

The link expression is ^(_*{name})[+\-_]*[0-9|a-z]*\.(jpg|jpeg|dng|tif)$

This grabs all files starting with the same name as the master file and any number of following digits or characters or +-_

When I test the default for CR2 with your file names using the built-in test tool (Testing Expressions) for file relations, all are matched. So it should work out-of-the-box, with no need for you to change anything.
« Last Edit: August 16, 2020, 03:30:32 PM by Mario »

mvkuilen

  • New Members
  • *
  • Posts: 20
Re: Buddy Files and Versioning
« Reply #2 on: August 16, 2020, 02:44:00 PM »
Thanks for the link to the regular expressions, exactly what I was looking for. Now for some study time.

I selected "CR2 in the startup" but what if I change camera or import images made in other cameras? Can this section be rerun?

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31552
Re: Buddy Files and Versioning
« Reply #3 on: August 16, 2020, 03:32:48 PM »
You can just create another buddy file relation and then copy/paste as needed.
IMatch supports any number of buddy and version relations (keep it simple, though).

Usually only the master expression changes, and the syntax is always \.(ext)$
If you want to use the same buddy setup for multiple masters, e.g. CR2 and CR3, you can just extend the master expression to use multiple extensions:

\.(cr2|cr3)$

There are several examples in the Configuring File Relations help topic. It also has a link to the regular expression help topic and other related help topics. Well worth a read.