Find by partial folder name

Post Reply
stefan144
Posts: 14
Joined: 20 Jan 14 21:30

Find by partial folder name

Post by stefan144 » 26 Jan 14 18:23

Hi,

I have lots of folders like "rainbowparade", "technoparade" or "springbreakparade". Now I want to find images which have a folder with "*parade*" in their filepath. It's kind of a name search with wildcards. How can this be done in PSU as wildcards are not implemented in the text search (Quick search)?

Thanks,
Stefan

Hert
Posts: 6685
Joined: 13 Sep 03 7:24

Re: Find by partial folder name

Post by Hert » 28 Jan 14 0:23

"Quick Search" uses the "free text search" rules and searches on "words".
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

stefan144
Posts: 14
Joined: 20 Jan 14 21:30

Re: Find by partial folder name

Post by stefan144 » 28 Jan 14 21:20

I tried to do it with a script and took the script 'Search by SQL Query' from http://repository.idimager.com as starting point, but it didn't work :

Code: Select all

var
  ACatItems: TCatalogItems;
  ADm: TDBXOMClientDataSet;
begin
  
   ACatItems := TCatalogItems.Create(TCatalogItem, '');
   try
       ACatItems.LastSort := SearchResult.LastSort;
       ACatItems.LastSortOrder := SearchResult.LastSortOrder;
           
              begin
                     ADm := Catalog.NewDataSet;
                     ADm.CommandText := 'SELECT' + Catalog.FullColumnList('') + 'FROM    idCatalogItem id_ci, idFilePath id_fp WHERE  id_ci.PathGUID = id_fp.GUID      AND id_fp.Filepath like '%parade%'';
                     ADm.Run;
                     SearchResult.Items.AddDataSet (ADm);
                     ADm.Free;
               end;
   finally
       ACatItems.Free;
end; 
I don't know how to display the result in PSU, I'm looking for a way to display the result of the query PSU. Can this be done?

Thanks, Stefan

Hert
Posts: 6685
Joined: 13 Sep 03 7:24

Re: Find by partial folder name

Post by Hert » 29 Jan 14 0:37

Stefan,

That script is based on an IDimager script, and won't work in Photo Supreme.

And not the easiest script to begin with ;)
Anyway, here's a working version for Photo Supreme

http://repository.idimager.com/cgi-bin/ ... 6f2a34c3a8

Hope that helps

Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

stefan144
Posts: 14
Joined: 20 Jan 14 21:30

Re: Find by partial folder name

Post by stefan144 » 29 Jan 14 21:44

Thanks a lot for this perfect solution!
I'll immediately buy my copy of PSU!

Stefan

Post Reply