Page 1 of 1

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

Posted: Sun May 31, 2020 1:49 pm
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

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

Posted: Sun May 31, 2020 2:34 pm
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?

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

Posted: Sun May 31, 2020 2:55 pm
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

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

Posted: Sun May 31, 2020 8:51 pm
by NotNull
And @therube's suggestion ( child:*.txt | child:*.jpg ) didn't give you the results you were looking for?

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

Posted: Mon Jun 01, 2020 11:19 am
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.

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

Posted: Mon Jun 01, 2020 11:24 am
by void
Please try the following search:
child:*.txt child:*.jpg

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

Posted: Mon Jun 01, 2020 12:43 pm
by w64bit
Yesss. Thank you very much.

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

Posted: Mon Jun 01, 2020 8:07 pm
by therube
(Oh, I OR'd it.)