Is there a way to have a folder event only include files in a subfolder

Started by stefanjan2, January 06, 2024, 06:51:50 PM

Previous topic - Next topic

stefanjan2

I have created an event based on a top level folder with subfolders containing mainly RAW Files and below that folders containing jpegs folder name "Processed".

I'm currently filtering by file name "\.jpg" to include only processed jpegs. This mainly works except I have a few master jpeg images taken on my phone with processed jpegs in the processed folders.

I'm wondering whether it is possible to include a filter for "processed" subfolder.  I checked the help topic and it looks like this is not possible.

Mario

No. Else it would be mentioned in the documentation.
Maybe not include sub-folders? Maybe make an event from a manual selection of files, including files you don't want to include in the event.

Not all fringe cases can be covered without making events overly complex. And most users only need simple and hate complex.

There are many ways to create events, and if the way folder-based events work don't work for your particular folder structure, consider another way.

Manual event based on selected files? Works pretty well, unless you plan to change the folder contents later.
Setup a category based on a @RFolder formula and a NOT formula that excludes the processed folder. Then create an event based on that category?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

stefanjan2

Thanks for confirming not possible to do this with events.

As an alternative approach, I'm wondering whether it would be possible to create a data driven category which returns all .jpg files in folders named "processed" e.g.
2024\2024-01-01\processed\*.*
2024\2024-01-05\processed\*.*
.....

I could then use the category in a filter.

If this is not an option then I guess solution would be to name all processed images uniquely e.g. *_f.jpg

Mario

You want to create a folder- based event from a folder hierarchy. This hierarchy contains both original files and processed files in JPG format. But it also contains JPG files which are in fact original files.

I thought I understood that you only want to include files in the "processed" folder(s), not files in the folders above that.
For that I recommended using @RFolderRegExp for a formula-based category and then creating an event from that category. The event then contains files only from the "processed" sub-folders. Why does this not work for you?

QuoteAs an alternative approach, I'm wondering whether it would be possible to create a data driven category which returns all .jpg files in folders named "processed" e.g.
What have you tried so far?

A data-driven category has one criteria per level, e.g. a metadata tag (including the photools.com tags, e.g. for extension). You could probably construct something with a variable that filters for folder names and extensions, but that would be a bad drag on performance if your database is even moderately sized.

You can combine @RFolderRegExp with @FileRegExp using AND for a formula-driven category to get only files from certain folders with certain formats. But I don't know how well this will perform.

In general, if a user runs into this kind of problems, he should pause and give a big think about his folder hierarchy and file naming convention and if it still matches his workflow and requirements.

Maybe first finish the folder so all the files are "done".
Then select the files you want to include in your event and create a file-based event from that. If the files are done, they are static and a dynamic event is not really needed. In case you still have to add/remove some files later from the folder, you can add/remove them from the event easily too.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

stefanjan2

Quote from: Mario on January 07, 2024, 02:31:14 PMif a user runs into this kind of problems, he should pause and give a big think about his folder hierarchy and file naming convention and if it still matches his workflow and requirements.
Yes, thanks for the advice, changed my workflow so the event uses #f\.jpg

Used Microsoft Power Rename to rename the already processed files to #f\.jpg (couldn't use imatch Renamer as it would not allow me to rename Buddy files)

Updated Photolab export template to add #f to file name.

All seems to work perfectly now. I can create folder based Events which dynamically filter on processed files.

With hindsight I was exploring complicated solutions when a simple one was available!

Mario

Quote(couldn't use imatch Renamer as it would not allow me to rename Buddy files)
That's because buddy files will be renamed with their master files automatically.

If you have, for some reason, the  need to rename buddy files in IMatch, temporarily disable the corresponding buddy file relation.

That's way better than renaming buddy files externally and then having to relocate them afterwards in IMatch to bring them back online again. Or losing the associated data by bringing them in as new files.

QuoteWith hindsight I was exploring complicated solutions when a simple one was available!
Yes. That's why I made the remark about adjusting folder hierarchies or file naming conventions.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook