How to chain search previous results?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
aiko6992
Posts: 3
Joined: Fri Dec 01, 2023 3:29 am

How to chain search previous results?

Post by aiko6992 »

In my usecase, I've used container-filenames to get some compressed files, then I need to get the associated preview image for these zip files which mostly with the same file name. e.g. AAA.zip to AAA.jpg or AAA.png.
Currently I'm copying all stems in previous search result and build a "AAA"|"BBB" query manually but it's very tedious. Are there some syntax tailored for this usecase? Something like I can reference the first part of my query input and use it as a macro in same query.
void
Developer
Posts: 16779
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to chain search previous results?

Post by void »

Is something like the following useful:

ext:png;jpg fileexists:$stem:.zip

-Finds png or jpg files where a zip file exists with the same stem.

fileexists:
aiko6992
Posts: 3
Joined: Fri Dec 01, 2023 3:29 am

Re: How to chain search previous results?

Post by aiko6992 »

Thank you for replying! Since the filename I need can only be queried by container-filenames, so even i've got this same stem file list, i still can only query out the zip files in the list but not image files. Similar to regex backreference: (container-filenames:apple) stem:\1.png|stem:\1.jpg would be so helpful.
Last edited by aiko6992 on Tue Dec 05, 2023 11:08 pm, edited 1 time in total.
void
Developer
Posts: 16779
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to chain search previous results?

Post by void »

Could you please give a search example.

What are you searching for when using container-filenames: ?
Could you please give example file names in your zip and the stem search you wish to perform.


(container-filenames:apple) stem:\1.png|stem:\1.jpg
What should \1 be replaced with here? the zip stem? the container filename match?

Please try something like:

*.zip regex:containerfilename:([^/]*apple[^/.]*)\.[^\.]*$ addcol:regmatch1

This would show the stems in the regmatch1 column.



To search these stems:
Select all files (Ctrl + A)
Right click under the Regular Expression Match 1 column and click Copy Regular Expression Match 1.
Change the search to:
ext:jpg;png stem:
Paste your stems.
after pasting your search should look something like:
ext:jpg;png stem:<apple|banana|orange>
(are you trying to remove this extra step here?)



With the following search:

*.zip regex:containerfilename:([^/]*apple[^/.]*)\.[^\.]*$ addcol:regmatch1

Add the following:

fileexists:$1:.jpg | fileexists:$1:.png

This will list zip files where the png/jpg exists.

!<fileexists:$1:.jpg | fileexists:$1:.png>

This will list zip files where the png/jpg doesn't exists.
aiko6992
Posts: 3
Joined: Fri Dec 01, 2023 3:29 am

Re: How to chain search previous results?

Post by aiko6992 »

I'm searching all compressed file which contains .vrm file, I'm searching `container-filenames:.vrm`
I'm assuming the \1 should be replaced by the individual "file instance" of the search result for the input inside the bracelets, then it's properties can be used for the search step 2.

example: Image

the search result i need here is pic: "jp.pokemori.vrm-converter-for-vrchat-40.1.1"|"Guri_1.01"|"Chupami_vrm"|"393.Xanadu"|"sd_kurone_kantenneko_v1.00"
Last edited by aiko6992 on Tue Dec 05, 2023 11:57 pm, edited 1 time in total.
aiko6992
Posts: 3
Joined: Fri Dec 01, 2023 3:29 am

Re: How to chain search previous results?

Post by aiko6992 »

Yes... I'm trying to remove these extra steps, the result I need is indeed ext:jpg;png stem:<apple|banana|orange>
void
Developer
Posts: 16779
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to chain search previous results?

Post by void »

Currently, there's no way to avoid the extra copying/pasting step.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to chain search previous results?

Post by NotNull »

aiko6992 wrote: Tue Dec 05, 2023 10:22 pm Currently I'm copying all stems in previous search result and build a "AAA"|"BBB" query manually but it's very tedious.
To speed up that process, the following might help: (Untested...)
  • Start with your original search to get a list of zip-files.
  • 'CTRL + A' to select them all
  • Right-click in the Stem column
  • Select the Copy context-menu entry to copy all stems to the clipboard

    (so far nothing new ... )
  • In a new Everything window/tab (you can even re-use the original window) enter the following in the search bar:

    Code: Select all

    pic:   wildcards:stem:
  • Press 'CTRL +V' to paste the stems of the filenames
    (There should be no spaces after stem:)
  • Done.
This requires Match whole filename when using wildcards to be enabled (Menu:Tools > Options > General > Search ). That is the default, btw.



The wildcards: search modifier was added to get the exact stem, to prevent abc.zip to produce 123abc.jpg results.
exact:stem: instead of wildcards:stem: will likely get the job done too.
Post Reply