[Solved] Search for folders containing both *.txt and *.jpg

General discussion related to "Everything".
Post Reply
w64bit
Posts: 254
Joined: Wed Jan 09, 2013 9:06 am

[Solved] Search for folders containing both *.txt and *.jpg

Post by w64bit »

How can I search for folders containing *.txt and *.jpg?
It is not necessary to be only these file types inside the folder.
I want to display only the folders directly containing those file types. If these files are in a subfolder, the folder should not be listed.
Thank you
Last edited by w64bit on Tue Mar 16, 2021 11:34 am, edited 2 times in total.
therube
Posts: 5003
Joined: Thu Sep 03, 2009 6:48 pm

Re: Search for folders containing *.txt and *.jpg

Post by therube »

While not "right", this might be close enough,
child:.txt | child:.jpg
?

(There could be false results, like, test.txt.doc & txt [with no extension] & ...)

If these files are in a subfolder, the folder should not be listed.
Not following what you mean by that, but maybe
parents:
would work into the equation?
w64bit
Posts: 254
Joined: Wed Jan 09, 2013 9:06 am

Re: Search for folders containing both *.txt and *.jpg

Post by w64bit »

folder1 > folder2 >>> folder3 >>>> folder4 > file4.mp4
......... > file1.txt | > file2.gif | > file3.txt
......... > file1.jpg | > file2.tif | > file3.jpg
......... > file1.png | xxxxxxxx | > file3.avi

folder1 contains folder2 + all files1
folder2 contains folder3 + all files2
folder3 contains folder4 + all files3
folder4 contains file4

the result should be folder1 + folder3
Last edited by w64bit on Mon Jun 01, 2020 11:23 am, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search for folders containing *.txt and *.jpg

Post by NotNull »

And @therube's suggestion ( child:*.txt | child:*.jpg ) didn't give you the results you were looking for?
w64bit
Posts: 254
Joined: Wed Jan 09, 2013 9:06 am

Re: Search for folders containing both *.txt and *.jpg

Post by w64bit »

No. It listed all folders containing only JPG or only TXT.
The scope is to display only the folders containing both JPG and TXT.
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search for folders containing both *.txt and *.jpg

Post by void »

Please try the following search:
child:*.txt child:*.jpg
w64bit
Posts: 254
Joined: Wed Jan 09, 2013 9:06 am

Re: Search for folders containing both *.txt and *.jpg

Post by w64bit »

Yesss. Thank you very much.
therube
Posts: 5003
Joined: Thu Sep 03, 2009 6:48 pm

Re: Search for folders containing both *.txt and *.jpg

Post by therube »

(Oh, I OR'd it.)
Post Reply