Find masters with versions that contain the word "web" in file name

Started by jarraun, September 07, 2016, 08:20:03 PM

Previous topic - Next topic

jarraun

Hi users,

I`d want to resize the images uploaded to my web site, all the images have a file name like this: pirivis20160907_web.jpg and are versions of master raw files like this pirivis20160907.nef. In order to resize the raw file and then save as jpg I must find all the master files (pirivis20160907.nef) which have a jpg web version (pirivis20160907_web.jpg), .
Has anyone of you an idea how to find or filter image masters which have a version that contain the word "web" in file name. Can´t imagine how to do it  ???. Help will be very apreciated.

Best Regards

Javier


Mario

It's obviously easy to find all files which are a) versions (File Attributes Filter) and which contain the word 'web' (file window search bar or file name filter). But this also hides the masters from the file window, which prevents the "Goto Master" command from working (assuming that the master files are in the same scope). IMatch can do a lot, but not everything is possible.

Find the versions first. Put them into a collection or maybe a category.
Then you can find the master for each version (individually) using the "Goto Master" command.

It could be done via a purpose-built script, though. If you need something unusual like this often, a script would be a good solution.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jarraun

Thank you Mario, very grateful for your help  :D, I will try it later at home and let you know. Nope with the scripts, no time to learn more things.

jarraun

Hi Mario,

Unfortunately the "Goto Master" command doesn´t suit my needs as my masters are already in the same folder as their versions and accessing masters individually don´t save me time for selecting all the required masters and afterwards batch processing them.
Anyway I´m going to label all the required masters one by one, not many just 526  :P and perhaps I´ll make a feature request for a "Show all masters" of selected  versions command. Thank you for your time.

sinus

Quote from: jarraun on September 09, 2016, 08:31:14 AM
Hi Mario,

Unfortunately the "Goto Master" command doesn´t suit my needs as my masters are already in the same folder as their versions and accessing masters individually don´t save me time for selecting all the required masters and afterwards batch processing them.
Anyway I´m going to label all the required masters one by one, not many just 526  :P and perhaps I´ll make a feature request for a "Show all masters" of selected  versions command. Thank you for your time.

I cannot follow fully, sorry.
For the future you may think about a good filenaming-system.
My files for examples ends with

xxx_m.nef for masters
xxx_m_v.jpg for versions

Additionally all my masters has another label then all versions.

So it would be easy find for me all versions or all masters or both.
Only to think about it.
Best wishes from Switzerland! :-)
Markus

jarraun

Hi Sinus

The problem is not to find masters or their versions, this is easily acomplished with a filter, but finding masters of versions which have "_web" in their file names. From now on I will label or make a category with masters that have a version for web "pirivis20160907_web.jpg" just in case one day I have to resize or modify the version. And now I ask myself how to automatically label or make a category with masters "pirivis20160907.nef" that have a version for web "pirivis20160907_web.jpg"  :-\.

ubacher

You could try to set up a file relation (temporarily) where only a file with _web in it becomes the version.
Disable the other relations, refresh, propagate.
(But later restoring the original relations may be tedious???)

Or do the reverse: make the _web files temporarily the master and the raw file the version.

jarraun

Thank you Ubacher,

I´d prefer not to mess with my file relations, at the moment are working fine and for me is a little dificult deal with them.

Ger

Maybe using the attached script could be of any help.

First select all _web.jpg files and with that selection run the script.

The script searches for all files with the same base filename as the files selected.
The base filename in the attached script is defined in line 68: the leftmost 20 characters of the file name. I would assume for you the first 15 chars (pirivis20160907) for every filename is the base.
For every file in the selection the script searches files that have the same base, so the .nef file would be in scope. All files found will be written in a category. Define this category in the variable ResultCategory (line 6).

In the resultcategory you can simply select all nef files.

Ger

jarraun

Thank you so much Ger,

I´ll try the script later. What a wonderful community photools is with so many people sharing their knowledge  :).