sortbylist - folders on top? [Solved]

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
xy123
Posts: 217
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

sortbylist - folders on top? [Solved]

Post by xy123 »

This works, Lang folder is on top:

Code: Select all

if (<newpath> Like "C:\Program Files*") {
  sortbylist "*\Lang|Readme*.txt|License*.txt|*.exe", "|";
}
But this doesn't work:

Code: Select all

if (<newpath> Like "C:\Program Files*") {
  sortbylist "*\*|Readme*.txt|License*.txt|*.exe", "|";
}
Anyone know how to make all folders on top?
Last edited by xy123 on 06 Apr 2022 18:04, edited 1 time in total.

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

Re: sortbylist - folders on top?

Post by highend »

By just getting the folders first?

Code: Select all

    if (<newpath> Like "C:\Program Files*") {
        sortbylist listfolder(<newpath>, , 2+4) . "|Readme*.txt|License*.txt|*.exe", "|";
    }
One of my scripts helped you out? Please donate via Paypal

xy123
Posts: 217
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: sortbylist - folders on top?

Post by xy123 »

It works , thank you so much. :D

Post Reply