Reverse metadata propagation from Version to Master (again)

Started by Cobblestone-TLT, July 29, 2019, 10:12:17 PM

Previous topic - Next topic

Cobblestone-TLT

Hello! I've allready read closed topic in archive about this problem, and probably found there a solution:
Quote from: Mario...setting up a solitary relation rule which makes the JPEG the master and the RAW the version...
...If this works, the temporary rule can be dropped and the standard RAW = master rule re-enabled.

But I still have a question, and ask for advice! Which temporary rule should it be in my case:

Master name: "DSC0123.arw"
Version name: "20190730_235211 DSC0123.jpg"

Mario

What do you mean by "temporary rule"? What is your problem, exactly.

Do you need help setting up a regular expression which matches your version file name?

By the looks of it, something like .*{name}\.jpg  should work? This matches all files ending with the name of the master file and .jpg.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Cobblestone-TLT

Temporary rule is a rule, that "reverse" master-version relation of files (to propagate data from version to master).

So .jpg file becomes Master, and .arw - Version.

What pattern shuld I use in this case:

Master name: "20190730_235211 DSC0123.jpg"
Version name: "DSC0123.arw"

The problem is similar to the one that is discussed in that topic, and the proposed solution with a temporary change in the relationship between the files (master<>version) is quite satisfied. But I can't find a pattern to match names for files from my example.

Mario

This will be difficult to handle with a regexp, because you have to remove an unknown number (?) of characters when deriving the master name from the version name.
You are making your life unnecessary hard. Having such long file names, and different names for masters and versions, and trying to do a "reverse" master version (whatever that is)...

{name}\.arw$

would grab all files with the names ending in the master name and .arw extension.

You need to try a few things with your real files to see what works in your situation.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

I am not at my computer at the moment, but should this not be possible using a replacement expression like
/^\d{8}\_\d{6} //
The idea is to replace the part of the filename that starts with 8 digits, followed by an underscore,followed by 6 digits, followed by space with nothing, leaving only the DSC  part.
As I said, I can not test it at the moment, so I might be wrong.

And this can only work if your files are always named like in your example where a timestamp of fixed length is used as prefix.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Tveloso

I tested the Replacement Expression that Thorsten provided:

    ^\d{8}\_\d{6} //

...and it matches the example FileNames:

   

As he said, that expression matches only the fixed-length Date and Time prefix seen in the example FileName.

Another option that makes the expression just a little bit shorter:

    ^[0-9_ ]+//

...also matches the example FileNames:

   

...but it may be a little more "dangerous", as it matches files beginning with any combination of digits, spaces, and underscores.

--Tony