How to export/copy files with “JPG preferred, fallback to NEF”?

Started by leifel, July 24, 2025, 08:38:01 PM

Previous topic - Next topic

leifel

Most of my images are Nikon RAW files in the NEF-format. I use PhotoLab to edit those NEF-files, and to generate JPG-files from them. The JPG-files are saved in the same directory as its source NEF-file, and with the same filename except extension. IMatch is aware of the pairing dependency between the two files, and treats the JPG as so-called "buddy-files" of the associated NEF-files.

Sometimes I need to export a large number of JPG-files. I want to export a set of images that are tagged with a specific category in IMatch. I select that category and get a file-list of all images with that category associated. Problem is that in the result-list, both the NEF-files and their buddy JPG-files are contained. But I want to copy the JPG-files only, or the NEF-file if the NEF-file has no available JPG buddy-file (so I can convert the NEF-files to JPG in a separate batch outside IMatch after the export). I can't find a way to do this with IMatch.

If I just copy the files in the result-list I end up with mostly NEF-files and some JPG-files for the images that has no associated NEF-file. Practically the opposite of what I need.

I asked ChatGPT the same question and he guided me to write a script to do it. Is this really the case? I guess this workflow is needed by others. Maybe an idea for a new IMatch-feature? Or maybe such a script or app already exist somewhere?

Mario

I'm not aware of a script that does this. I have never had this use-case, and I don't recall a feature request for something like this either.

Probably most users always have versions/buddy files and don't run into this problem.
And I guess something like this would be very hard to implement in a general manner. You have the JPG files, if they exist, in the same folder as the RAW. 

Other users may have the JPG files in a different folder or even on a different drive! Or they would need more complex rules than "if I export file X and there is a file with the same name (or matching this regexp) in the same folder (or in another folder specified like this) and the extension is Y, export this file instead."

Nah, I don't think this will be something many users will ever need. File a feature request so other users with the same issue can like it and comment on it

Maybe one of the smart users in the community has an idea how to do this.

PandDLong

Quote from: leifel on July 24, 2025, 08:38:01 PMSometimes I need to export a large number of JPG-files. I want to export a set of images that are tagged with a specific category in IMatch. I select that category and get a file-list of all images with that category associated. Problem is that in the result-list, both the NEF-files and their buddy JPG-files are contained. But I want to copy the JPG-files only, or the NEF-file if the NEF-file has no available JPG buddy-file (so I can convert the NEF-files to JPG in a separate batch outside IMatch after the export). I can't find a way to do this with IMatch.

My first thought would be to create a filter that keeps all JPG files and any NEF file that does not have a buddy.  It would need to be a filter that uses a Variable.  Then apply that filter when the category is selected for your file window, select all and use the Batch Processor to copy/export the files.

I don't have access to IMatch at the moment, so I can't write and test such a filter right now.

Hopefully it is a useful idea.

Michael

thrinn

In your setup, is there only one versioning rule that makes NEF to masters?
In this case you might try this approach:

  • In case you don't have one: Setup a relation rule of type version (!) between NEF masters and JPGs as version. (This can exist in parallel to a rule making JPG a buddy of the NEF).
  • Select the category, as you described.
  • If I understand your request correctly, you may now have some pairs of NEF/JPG and some single NEFs without corresponding JPG. 
  • Use the Filter Panel -> File Properties -> Hide masters. This should filter out all NEFs with a corresponding JPG version. But a NEF without a JPG will not be a master, so these single NEFs will still be shown.

Unfortunately, I don't see an easy way to restrict the filtering on one specific Relation Rule. If your single NEF has been classified as master by some other rule, this easy approach will not work.
Thorsten
Win 10 / 64, IMatch 2018, IMA

thrinn

Another idea:
Setup a formula based category, e.g. called "JPG with NEF fallback".
Set the formula to:
"@All" NOT "@Collection[Relations|Master|NEF Versioning]"assuming your versioning rule is called "NEF Versioning". If not, just look for the correct one in the formula editor under Collections > Relations > Master.

  • Select your original category, as you described, to get the files you want to export into the file window.
  • Use the Filter Panel, but this time with the Categories filter. Mark the "JPG with NEF fallback" category and activate the Filter Panel.
  • This way, only files that are not masters with respect to the aforementioned rule are displayed. For a NEF/JPG pair, the is a master and will be filtered out. If there is only the NEF, it can not be a master, so it is shown.
Thorsten
Win 10 / 64, IMatch 2018, IMA

leifel

Thanks for the tips!
It will probably also help when I try to change so I use the jpg rather than nef as the master.
I will experiment further.