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

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Norn
Posts: 508
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
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
To see the attached files, you need to log into the forum.
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 66560
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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:
To see the attached files, you need to log into the forum.

Norn
Posts: 508
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
  
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 66560
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 508
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.
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 66560
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 508
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.
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 66560
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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