Page 1 of 1

Find image file based on name & properties

Posted: 07 Aug 2015 23:31
by Papoulka
I'm trying to use File Find to display all instances of "caption.jpg" (within a large folder tree) that do not have an image Y size of 475 pixels. I can't find a Boolean combination that works - assuming that's the best way to go. Can XY do this?

Thanks for any help.

Re: Find image file based on name & properties

Posted: 08 Aug 2015 01:53
by klownboy
There are many ways to accomplish this, but here's one.

Code: Select all

   $finder =  quicksearch("caption.jpg", <curpath>,"<crlf>");  //run in current path
   $total_list = "";
   foreach ($caption, $finder, "<crlf>") {
     if (property("ImageY", "$caption") != "475") {
        $total_list = $total_list . $caption . "<crlf>"}
   }
   echo $total_list;
Sorry, I noticed afterwards you were looking for a "Find Files" method in lieu of a "scripting" method. Tested though and it works.

Re: Find image file based on name & properties

Posted: 08 Aug 2015 07:35
by highend
:caption.jpg AND !prop:ImageY:1704

Re: Find image file based on name & properties

Posted: 08 Aug 2015 15:19
by Papoulka
Thanks to both for the helpful replies which show some important general techniques. I'll get a lot of use out of this.