Can i override sorting from QuickSearch?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
taufan
Posts: 51
Joined: 22 Mar 2020 02:33

Can i override sorting from QuickSearch?

Post by taufan »

Hi,
For example i wanna search "cow" and "yellow" images with random order.
Can i override sorting from QuickSearch input?
Maybe someting like this:

Code: Select all

cow AND yellow /sort=random
Any idea?
Thanks.

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

Re: Can i override sorting from QuickSearch?

Post by highend »

No, write a script instead...
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can i override sorting from QuickSearch?

Post by jupe »

Just recycling this topic.

@Don: I have always experienced quicksearch returns as being alphabetical per folder, I guess I was just usually using NTFS, but I have now noticed that the return for FAT32/exFAT is unsorted, so I just wanted to double check, is that correct that depending on file system the order will change?, I understood that to be the case for listfolder, but the returned order of QS and listfolder don't match, so it makes me uncertain.

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Can i override sorting from QuickSearch?

Post by eil »

I don't have answers, but have the question of myself corresponding to the topic's name.
When search happens results get added one after another, but when search ends there some sorting happens, changing that order from before - is there a way to change this/keep the order of how items were added to search results during the process?
I just really hate the often situation, when during search i see item i wanna check, and right the moment mouse pointer is over an item to open, search suddenly finishes > everything gets immediately re-sorted > i end up opening totally different item.
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: Can i override sorting from QuickSearch?

Post by admin »

jupe wrote: 02 Sep 2023 22:15 Just recycling this topic.

@Don: I have always experienced quicksearch returns as being alphabetical per folder, I guess I was just usually using NTFS, but I have now noticed that the return for FAT32/exFAT is unsorted, so I just wanted to double check, is that correct that depending on file system the order will change?, I understood that to be the case for listfolder, but the returned order of QS and listfolder don't match, so it makes me uncertain.
Isn't the sorting just done according to the sort order of the search results list?

And note also this setting in the right-click menu of the info bar:
To see the attached files, you need to log into the forum.

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

Re: Can i override sorting from QuickSearch?

Post by admin »

eil wrote: 04 Sep 2023 23:13 I don't have answers, but have the question of myself corresponding to the topic's name.
When search happens results get added one after another, but when search ends there some sorting happens, changing that order from before - is there a way to change this/keep the order of how items were added to search results during the process?
I just really hate the often situation, when during search i see item i wanna check, and right the moment mouse pointer is over an item to open, search suddenly finishes > everything gets immediately re-sorted > i end up opening totally different item.
Set your search result list sort order to "Unsorted", then check this box:
To see the attached files, you need to log into the forum.

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can i override sorting from QuickSearch?

Post by jupe »

admin wrote: 08 Sep 2023 11:43 Isn't the sorting just done according to the sort order of the search results list?
Of course I am talking about SC quicksearch though, that is why I mentioned listfolder.

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

Re: Can i override sorting from QuickSearch?

Post by admin »

jupe wrote: 02 Sep 2023 22:15 Just recycling this topic.

@Don: I have always experienced quicksearch returns as being alphabetical per folder, I guess I was just usually using NTFS, but I have now noticed that the return for FAT32/exFAT is unsorted, so I just wanted to double check, is that correct that depending on file system the order will change?, I understood that to be the case for listfolder, but the returned order of QS and listfolder don't match, so it makes me uncertain.
I checked it: Yes, correct. No sorting is done. Results are returned as provided by the file system.

However, the SC listfolder is sorted in ABC order by default (and further affected by the setting of Configuration | General | Sort and Rename | Sort | Sort method).

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can i override sorting from QuickSearch?

Post by jupe »

OK, I guess I will need to get in the habit of always doing post results sorting if I am going to be using scripts on exFAT drives and need to ensure that for example a xml file comes after a same name jpg, until now I had incorrectly assumed I could rely on QS results being alphabetical on all file systems.

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Can i override sorting from QuickSearch?

Post by eil »

admin wrote: 08 Sep 2023 11:49 Set your search result list sort order to "Unsorted", then check this box:
Thank for for a hint. Decided to mention that after i set Sort order = Unsorted, that mark is already auto-set and i actually can't un-mark it. Looks little weird but doesn't seem to harm.
Win 7 SP1 x64 100% 1366x768|1900x1080

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can i override sorting from QuickSearch?

Post by jupe »

it gets unmarked by you changing the sort

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

Re: Can i override sorting from QuickSearch?

Post by admin »

jupe wrote: 08 Sep 2023 18:19 OK, I guess I will need to get in the habit of always doing post results sorting if I am going to be using scripts on exFAT drives and need to ensure that for example a xml file comes after a same name jpg, until now I had incorrectly assumed I could rely on QS results being alphabetical on all file systems.
Well, there's a flags parameter. One could add something here... :whistle:

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can i override sorting from QuickSearch?

Post by jupe »

I was hoping you might feel inclined to do that... :ninja:

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

Re: Can i override sorting from QuickSearch?

Post by admin »

This should do:

Code: Select all

    + SC QuickSearch enhanced: The new flag "o" ("order") sorts the results alphabetically 
      ascending. This makes a subtle difference on NTFS and a huge difference on 
      FAT32/exFAT.
      Syntax: quicksearch([query="*"], [path], [separator="<crlf>"], [flags])
        flags:  [optional] String of flags to modify the function.
                o: Sort results alphabetically in ascending order.
      Examples:
        text quicksearch("*.txt", 3:="");   //unsorted
        text quicksearch("*.txt", 3:="o");  //alphabetically ascending
Question: which of these settings should affect the outcome?
- Configuration | General | Sort and Rename | Sort | Sort method
- Configuration | General | Sort and Rename | Sort | Sort filenames by base*

* ah, this is currently not possible anyway

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

Re: Can i override sorting from QuickSearch?

Post by admin »

PS: Hmmm, maybe sorted should be the default and there should be a "u" flag for unsorted? :eh:

Post Reply