You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jetpeach

Beginner

  • "jetpeach" started this thread

Posts: 27

Location: Seattle

  • Send private message

1

Wednesday, January 4th 2006, 1:41am

sorting files - character before 'a' or 'A' ?

Sometimes I have a file that I always want to be sorting to the top of a folder. I always have sort by name on, and in windows I used to just add an exclamation point before the filename, like "!important.txt" and would know it would be at the top of a folder next time I needed it. In KDE, it doesn't seem to matter what non-character I put first because it gets ignored. Does anybody know if there is a setting to change this such that ! or ^ or anything I can use will make a file go to the top? Or is there a character I maybe haven't tried that comes before 'a'? I could just use 'aimportant' or something but it looks like ass and I'd rather have a non-character first to distinguish these files.
Thanks!
jet
My Zoji homepage
http://www.zoji.com/jet

2

Wednesday, January 4th 2006, 9:18am

RE: sorting files - character before 'a' or 'A' ?

What about a subdirectory "important"? If your search for important files, you can just enter that directory.

AdaHacker

Beginner

Posts: 14

Location: Corning, NY

Occupation: Systems Analyst

  • Send private message

3

Wednesday, January 4th 2006, 10:43pm

Konqueror does both case-sensitive and case-insensitive sorting. If you use case-sensitive, then items starting with "!" will appear first. You can set case-sensitive sorting by going to the "View"->"Sort" menu and selecting "By Name (Case Sensitive)".

jetpeach

Beginner

  • "jetpeach" started this thread

Posts: 27

Location: Seattle

  • Send private message

4

Thursday, January 5th 2006, 12:54am

Thanks! I never actually tried the case-sensitive sort because I just assumed the ! and ^ would still be ignored.
My Zoji homepage
http://www.zoji.com/jet

Lethe

Beginner

Posts: 41

Location: Pompey, England

Occupation: IT network/sysadmin

  • Send private message

5

Thursday, January 5th 2006, 6:24pm

Useless fact. Ever wonder why source code always has a README file (and other important files) like that?

It is due to legacy from Unix terminals so that when people used to list directory contents, the important files were listed first (Makefile is another example).

Nick

jetpeach

Beginner

  • "jetpeach" started this thread

Posts: 27

Location: Seattle

  • Send private message

6

Friday, January 6th 2006, 2:24am

Hmm, so it seems that all capitalized letters still go first, before ! and other such characters. If anybody knows if there is a preference still for not ignoring non-characters when sorting, please post. I have various examples where this is useful and sorting non-characters first is the default behavior of windows 98/xp etc, and while I'm not saying that is how it should be by default in KDE it would be a nice option (esp for me, since I have dozens of directories organized with that in mind...)
My Zoji homepage
http://www.zoji.com/jet

7

Sunday, February 12th 2006, 1:37pm

I have the same inconvinience as you... I have all important folders which I want to be at the top of the list with a "_" character (i.e. "_Drivers") but on Konqueror they just omit that character when sorting.

As a work around I have added a cero in front, and it make it work on windows also ("0_Drivers"), although I would prefer simply the "_" or your "!" ;)

Cheers,
Mguel

eetbeest

Beginner

Posts: 30

Location: Europe

  • Send private message

8

Sunday, February 12th 2006, 4:27pm

Sorting

Sorting is case-sensitive or insensitive as pointed out earlier in this thread; the rest of sorting depends on your locale. In many cases, you'll be sorting US-ASCII characters (A-Za-z0-9!_ to name a few) by US-ASCII code point value. In this order, you get ! before the numbers 0-9 before the capitals A-Z before _ before the lowercase a-z. I'm not sure how that interacts with case-insensitive sorting, but it comes down to: files you want at the top get capitals or a !; don't use _, since it sorts after the capitals.