Sort by modified with FOLDERS on top

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
reebae
Posts: 17
Joined: 12 Aug 2020 13:57

Sort by modified with FOLDERS on top

Post by reebae »

Hello,

I'm a little confused as to how to achieve this. I frequently sort by name and by various dates. Sometimes I would like to sort by modified date in general, and sometimes I would like to sort by modified date with folders on top (unsorted). I thought ::#333 was the answer, but that seems to change the config setting and doesn't achieve the required sort on a single pane for a single instance. Is there a temporary way to use "Keep folders on top" perhaps?

My usage: I download a file into a directory with many folders and files. When I sort by modified, my last downloaded files appear at the top. I need to drag that recently downloaded file into a folder within the directory, but that folder may be way down in the list. I'd like that folder to be at the top, but only when I click a scripted button or custom catalog option.

Thank you.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Sort by modified with FOLDERS on top

Post by klownboy »

Try CID #333 - Sort Folders Apart and also
CID #239 - Keep folders on top
There's a Configuration setting for Keep folders on top as well Tools > Configuration > General > Sort and Rename > Keep folder on top
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

reebae
Posts: 17
Joined: 12 Aug 2020 13:57

Re: Sort by modified with FOLDERS on top

Post by reebae »

klownboy wrote: 26 May 2022 16:05 Try CID #333 - Sort Folders Apart and also
CID #239 - Keep folders on top
There's a Configuration setting for Keep folders on top as well Tools > Configuration > General > Sort and Rename > Keep folder on top
Thank you. When I tried 333 before, I didn't also set Keep Folders on Top in config (by the way, there's no 239 in my build). In doing both steps, the final result looked a little better and closer to what I needed, but still not what was functional for my use. Currently, what's working is:

Into my directory with about 37 folders and lots of files, I download an additional file. I have the sort set to Date Modified so that new downloads show on top (and I keep Sort Folders Apart checked). I click to highlight the downloaded file. I then sort by NAME (catalog item), then 318 to get the Selected Item to the Top of the list (which moves it much much closer to the folders, one of which I will drag and drop this new file onto). If I need to resort, I added an additional catalog item, 332, to Sort Again. I will combine those last two commands (or maybe all 4) into one catalog item.

This is OK for now. Thank you.

I also think the "selected item to the top" is working on just the focused pane.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Sort by modified with FOLDERS on top

Post by klownboy »

reebae wrote: 27 May 2022 01:09 by the way, there's no 239 in my build
Mine either, sorry I must have been looking at the numbers on the left side of the List all Commands menu item instead of the Command IDs. Have you also tried the Configuration setting of "Scroll to top after resorting"? I don't know if that may help in your case.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

reebae
Posts: 17
Joined: 12 Aug 2020 13:57

Re: Sort by modified with FOLDERS on top

Post by reebae »

klownboy wrote: 27 May 2022 01:58
reebae wrote: 27 May 2022 01:09 by the way, there's no 239 in my build
Mine either, sorry I must have been looking at the numbers on the left side of the List all Commands menu item instead of the Command IDs. Have you also tried the Configuration setting of "Scroll to top after resorting"? I don't know if that may help in your case.
I haven't, but I will play around with it. Might just do the trick, or at least be a feature that saves me clicks and wrist movements overall.

reebae
Posts: 17
Joined: 12 Aug 2020 13:57

Re: Sort by modified with FOLDERS on top

Post by reebae »

I saw another reply but now it is gone?
I have entered the advice for visual filters into Try Script and I like it. I will play around with this more to see which solution works out best. Both suggestions seem like viable options.

Code: Select all

filter "age: < 1 d | attr:d";

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

Re: Sort by modified with FOLDERS on top

Post by jupe »

Yeah that was my missing post, I didn't have time to elaborate on my suggestion at the time, so was going to post again later with what I meant properly, because I wasn't sure if you could add the folders ontop functionality yourself which I had neglected to explain in my previous post. Anyway in full, I was suggesting something like this:

Code: Select all

  filter "age: < 1 d | attr: d";
  if (<get visualfilter>) { sortby "Modified", "a"; sortbylist quicksearch("/dn"); } else { sortby "Name"; }
which would work as a toggle and avoids messing with the global setting "Sort Folders Apart". Alternatively if you only temporarily want folders ontop without the filtering, you can just use this: sortbylist quicksearch("/dn"); but that wouldn't work as a toggle as it is without adding code, but that might suit your use case anyway.

Post Reply