If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Things you’d like to miss in the future...
Post Reply
Norn
Posts: 415
Joined: 24 Oct 2021 16:10

If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by Norn »

Not sure if this is an issue. If Sort Folders Apart is checked, the custom column of the folders cannot be sorted.
FolderSizes2.png
FolderSizes2.png (20.37 KiB) Viewed 264 times
If uncheck Sort Folders Apart, it will be sorted by number, I can modify the script to sort, it would be better if it can be improved.
FolderSizes.png
FolderSizes.png (20.26 KiB) Viewed 264 times
Win10, Win11 @100% 2560x1440 22H2

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

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by admin »

Maybe I did not understand what you mean, but I can sort folders by a custom column:
Attachments
SortByCustomColumn.png
SortByCustomColumn.png (41.33 KiB) Viewed 244 times

Norn
Posts: 415
Joined: 24 Oct 2021 16:10

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by Norn »

1) I checked this option:
Configuration | General | Sort and Rename | Sort | Sort folders always ascending

2) If it can be improved, a custom column with random folder size:

Code: Select all

Snip: CustomColumn 1
  XYplorer 24.40.0208, 2023/6/6 18:24:47
Action
  ConfigureColumn
Caption
  FolderSize
Type
  3
Definition
  $state = rand(1, 5);
   switch ($state) {
    case 1:                 return formatbytes(0, "FLEX");
    case 2:                 return formatbytes(rand(0, 99999), "FLEX");
    case 3:                 return formatbytes(rand(99999, 999999), "FLEX");
    case 4:                 return formatbytes(rand(999999, 99999999), "FLEX");
    case 5:                 return formatbytes("99999999999", "FLEX");
   }
Format
  0
Trigger
  1
Item Type
  1
Item Filter
  
Win10, Win11 @100% 2560x1440 22H2

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

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by admin »

You checked "Sort folders always ascending" and wonder why folders are not sorted? :eh:

Norn
Posts: 415
Joined: 24 Oct 2021 16:10

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by Norn »

Nope. :whistle: The first problem has been solved.
Win10, Win11 @100% 2560x1440 22H2

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

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by admin »

What's the second problem?

Norn
Posts: 415
Joined: 24 Oct 2021 16:10

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by Norn »

it will be sorted by number, I can modify the script to sort, it would be better if it can be improved.
Not a problem, not sorted by KB, MB, GB.
Win10, Win11 @100% 2560x1440 22H2

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

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted

Post by admin »

Ah I see. Try Format "Bytes".

And change your script to:

Code: Select all

$state = rand(1, 5);
 switch ($state) {
  case 1:                 return 0;
  case 2:                 return rand(0, 99999);
  case 3:                 return rand(99999, 999999);
  case 4:                 return rand(999999, 99999999);
  case 5:                 return "99999999999";
 }

Post Reply