Is it possible to select multiple types in a search?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
forgottenit
Posts: 10
Joined: 23 Jan 2016 20:40

Is it possible to select multiple types in a search?

Post by forgottenit »

Hi.

I am using version 145.30.0300. In the search feature, under name & location, you can specify image file or office file etc. Is it possible to select more than one of those?

I don't mean just searching for multiple specific extensions; after all 'office file' covers a shedload of extensions. How can I do that?

Many thanks

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to select multiple types in a search?

Post by highend »

Welcome to the forum.

Unfortunately, this isn't possible. It can be done e.g. via quicksearch but only in the current beta version (v16.20.0006)
One of my scripts helped you out? Please donate via Paypal

forgottenit
Posts: 10
Joined: 23 Jan 2016 20:40

Re: Is it possible to select multiple types in a search?

Post by forgottenit »

Ok I will check out the Beta. Thanks.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Is it possible to select multiple types in a search?

Post by TheQwerty »

For the record prior to v16.20.0006 you could accomplish this in an ugly convoluted way via quick search using:

Code: Select all

?query & (<get GenericFileType {:Audio} " | "> | <get GenericFileType {:Office} " | ">)
This works in the address bar and quick search dialog, but not in the Find Files tab (the variables are not resolved).

Since v16.20.0006 the same can be achieved using the new /types switch:

Code: Select all

?query /types={:Audio};{:Office}
This also works well if you only want to search one of those filter types but want to include a few additional extensions as well:

Code: Select all

?query /types={:Office};jpg;png

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to select multiple types in a search?

Post by highend »

Further, you can use this switch within the Name field of the Find Files tab.
Not in my XY version :)

The screenshot shows that you got the search result from a quick search, not by clicking on the "Find now" button (which will list practically everything instead of items of the used /types=....)
One of my scripts helped you out? Please donate via Paypal

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Is it possible to select multiple types in a search?

Post by TheQwerty »

highend wrote:
Further, you can use this switch within the Name field of the Find Files tab.
Not in my XY version :)

The screenshot shows that you got the search result from a quick search, not by clicking on the "Find now" button (which will list practically everything instead of items of the used /types=....)
What screenshot? :whistle: :oops:
Indeed my test was flawed - I had clicked "Find Now" but didn't give it something to not find.

admin
Site Admin
Posts: 67264
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Is it possible to select multiple types in a search?

Post by admin »

A bug! :bug: The switch should work in Find Files just like in Quick Search, of course! Fix comes...

David.P
Posts: 72
Joined: 09 Dec 2006 11:21

Re: Is it possible to select multiple types in a search?

Post by David.P »

Hello all,

is this still not (easily) possible?

I'd like to search for *.doc and *.docx and *.txt files simultaneously if possible.

I tried this in the Name field of the Search dialog:

Code: Select all

*.doc | *.docx | *.txt
...but it didn't seem to work.

Thanks for ideas!

Edit: Oh wow it DOES work now. I had erroneously set the file size set to something very large.
So as usual, XYplorer simply ROCKS.

Thanks!

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to select multiple types in a search?

Post by highend »

Code: Select all

*.doc;*.docx;*.txt
would work as well

or an even shorter way (regex)

Code: Select all

>\.(docx?|txt)$
One of my scripts helped you out? Please donate via Paypal

David.P
Posts: 72
Joined: 09 Dec 2006 11:21

Re: Is it possible to select multiple types in a search?

Post by David.P »

Thanks very much highend

RalphM
Posts: 2143
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Is it possible to select multiple types in a search?

Post by RalphM »

Shouldn't the regex rather be like this?

Code: Select all

>\.(doc?|txt)$
Ralph :)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to select multiple types in a search?

Post by highend »

No, because that would search for .do, .doc and .txt
It's a regex, not a dos expression
One of my scripts helped you out? Please donate via Paypal

David.P
Posts: 72
Joined: 09 Dec 2006 11:21

Re: Is it possible to select multiple types in a search?

Post by David.P »

Regexes are a case of Clarke's third law and people who can do them are magicians -- for me personally as a Regex dummie

RalphM
Posts: 2143
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Is it possible to select multiple types in a search?

Post by RalphM »

highend wrote: ↑19 Sep 2020 16:16 No, because that would search for .do, .doc and .txt
It's a regex, not a dos expression
Okay, my bad. I crawl back under my regex stone.
Ralph :)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

Post Reply