Feature Request: Sort by Attr

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Xcorpio
Junior Member
Junior Member
Posts: 4
Joined: 2003-08-03, 18:07 UTC
Location: 3rd Rock from the Sun
Contact:

Feature Request: Sort by Attr

Post by *Xcorpio »

Hi,

I know this can be achieved with the use of some filters, however it would be useful to be able to do it by a shortcut or by clicking the attr column as well as is done for name, size, ext and date.


Thanks

:oops:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48107
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't currently done because there is no logical way to sort by attributes. What should be sorted first? Read only? Archive? Hidden? System?
Author of Total Commander
https://www.ghisler.com
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

ghisler(Author) wrote:This isn't currently done because there is no logical way to sort by attributes. What should be sorted first? Read only? Archive? Hidden? System?
Well, that's true but sorting sometimes (in my case most of the times) is used more like a grouping method for locating a desirable file or group of files other than a sorting method.

In the current case of attributes a logical sorting we can have is in order of security level/importance. And if even that is hard to decide, well, we always have the alphabetical one available! ;)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Xcorpio
Junior Member
Junior Member
Posts: 4
Joined: 2003-08-03, 18:07 UTC
Location: 3rd Rock from the Sun
Contact:

Sort by Attr options

Post by *Xcorpio »

ghisler(Author) wrote:This isn't currently done because there is no logical way to sort by attributes. What should be sorted first? Read only? Archive? Hidden? System?
Yes you are correct, there is not a simple way, However There are a couple of ways:

1. Given that we have 16 possible combinations with the 4 attributes you can just cycle over all of them.

2. Same as above but cycling only over the conbinations present in the current directory. Normaly there are not more than 4 or 5. (I like this one)

3. What about a simple 4 cases option sorting by first A (with the fisrt click) then by R H S (May also include Dir)

Regards,

Leandro
tcebob
Member
Member
Posts: 178
Joined: 2003-03-23, 22:11 UTC
Location: Sunrise FL, USA

Re: Sort by Attr options

Post by *tcebob »

If you value each attributeas a power of 2 then every combination will have a unique key number. Thus:

_ = 0
A = 2 = 1b
R = 4 = 10b
H = 8 = 100b
S = 16= 1000b

So, for example,

_ A R _ S = 22 = 1011

Now we have a basis for sort. If I want to extract all A's I just look for the 0001s, etc.

rs
tcebob
Member
Member
Posts: 178
Joined: 2003-03-23, 22:11 UTC
Location: Sunrise FL, USA

Re: Sort by Attr options

Post by *tcebob »

:oops: What I meant to say:
tcebob wrote:If you value each attributeas a power of 2 then every combination will have a unique key number. Thus:

_ = 0
A = 1 = 1b
R = 2 = 10b
H = 4 = 100b
S = 8 = 1000b

So, for example,

_ A R _ S = 11 = 1011

Now we have a basis for sort. If I want to extract all A's I just look for the 0001s, etc.

rs
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48107
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you value each attributeas a power of 2 then every combination will have a unique key number.
Yes, but what attribute would get the lowest number (and priority), and what the highest? For example, some people would want to see all read only files first, others all system files, and others all files with the archive bit - it depends on the user's needs!
Given that we have 16 possible combinations with the 4 attributes you can just cycle over all of them.
I don't think that this is feasible - pleople click 15 times only to recognize that the one they wanted was 1 click back...
Author of Total Commander
https://www.ghisler.com
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Hello there,

maybe this could be somehow a solution.

Right click on Attr.-tab will list files only with selected attribute sorted depending on name, extension, size, date tab.

I have the choice between _ A C E H R S (no attribute set, archive, compressed, encrypted, hidden, readonly, system).

Example: I pick "A". And all files that have at least attribute "Archive" enabled will be listed only. And these files will be sorted depending on which tab I have chosen for sorting (name, extension, size, date).

Greets
Pete
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

That sounds nice Pete!

What I thought could be another solution is to adopt a filtering system other than an actual sorting method. I cannot see a use for having the files in a list sorted somehow based on their attribute but it would be useful if we could filter the list and be able to see for example only read-only files. The feature becomes then a viewing mode and not a sorting mode but it's a lot more easy to code yet useful and practical and you get 90% of the sorting functionality already if multiple criteria can be applied on the filtering system!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Hello there,

in the choice list from my posting above I forgot to add a letter for listing all files. This letter could be "*".
Therefore my "sorting" range looks like this:
* _ A C E H R S (all files, no attribute set, archive, compressed, encrypted, hidden, readonly, system).

This ability of LISTING files depending on attribute (right click on Attr.-tab) would be less keystrokes than using search dialogue with options (Alt-F7), but would have same effects.

Greets
Pete
MikeTheGuru
Junior Member
Junior Member
Posts: 63
Joined: 2003-05-12, 18:44 UTC

Post by *MikeTheGuru »

MikeTheGuru
RegNr #48208
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

ghisler(Author) wrote:This isn't currently done because there is no logical way to sort by attributes. What should be sorted first? Read only? Archive? Hidden? System?
How about the same way MS explorer does it, as words.

http://w1.171.telia.com/~u17106176/attr.gif


// Peter
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

petergus wrote:How about the same way MS explorer does it, as words.
Yes, that's what I said on my first post also.

If no logical method can be found for sorting we always have the alphabetical one available.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Post Reply