Page 1 of 1

Orphaned sidecars or buddies

Posted: Fri Feb 24, 2023 11:02 am
by flubber
Hi!

Seems I'm totally lost in the regex and its recall (\1. . .\9) matches. [sigh]

Given the following samples:
Original file: <path>\<filename>.tif
Buddy file: <path>\buddies\<filename>.tif.jpg

"buddies" is a fixed folder name.

How can I find all buddy files that without an existing original file?

Is there a way to display the content of recall matches?

Thanks for reading, flubber

Re: Orphaned sidecars or buddies

Posted: Fri Feb 24, 2023 3:50 pm
by therube
Do you need regex: particularly?

Can you just add !\buddies to your search (in combination with regex:, if needed)?

See also, viewtopic.php?p=54095#p54095

Re: Orphaned sidecars or buddies

Posted: Sat Feb 25, 2023 9:20 pm
by flubber
Hi!

This seems to work:

Code: Select all

ext:tif.jpg \buddies\ regex:^(.*\\[^\\]+)\\(.*)\\(.*)(\.[^/.]+)$ !fileexists:\1\\\3
regex101 was very helpfull: https://regex101.com/r/8py4PC/1

Group 1 and group 3 are used to build the fileexists expression. Took me quite some time with lots of try and error :?

Thanks for reading, flubber