What character to use to put an item at the end of an alphabetic list? [closed]
I often prepend '_____' to the item I want in first position.
Is there some sort of magical character I could use to put an item at the end of the list?
Something more elegant than "z_item".
Example of this issue for a list of files in Windows Explorer :
Another example from Outlook 2010
Actual folder structure :
- _custom folder1
- _custom folder2
- Inbox
- Sent box
- Spam folder
Expected folder structure :
- Inbox
- Sent box
- Spam folder
- [?]custom folder1
- [?]custom folder2
What caracter could I use?
Solution 1:
I found this thread while wanting folders that sort after Z in Finder on Mac OSX. After several false paths and trial and error, here's what I found:
Characters that sort after Z in Finder (in sort-order)
- z Lower case Z
- ι Greek letter
- Ι Greek letter, capital version of above character, not an "I")
- Ω Omega
- 一 Japanese Character? (Thanks, Jam)
- 口 Japanese character? (Thanks, Jam)
- 末 Japanese character "End" (Thanks, Jam)
- (a private use character) (Thanks, Peter O.)
These are characters others here and in other places on the web, mentioned sort after Z, but that I found DO NOT sort at the end, at least when sorting by name in Finder on Mac:
† ∆ ~ - ſ [ ø ■ |
Solution 2:
The Special lead-in Character that will put your folder at the end of the list without having to resort to using the "z" combo: U+E83A: Private Use. In fact, I believe any of the Private Use characters will work. () Just copy and paste the character between the brackets.
Solution 3:
Don't mess up things using strange characters!
I would not suggest using Private Use characters or non-printable characters because they can really mess up the things when you access your folder from terminal or programming languages. I had annoying issues using 末 or other special characters. For example, using Python 2.7, this is how you will see your folders with the non-printable characters Ω, 末, 口,.
os.listdir(os.getcwd())
Out[2]: ['\xe6\x9c\xab ', '\xe5\x8f\xa3 ', '\xce\xa9 ', '\xee\xa0\xba ']
For someone or something using your folder structure, accessing the folder would be very confusing (and you can see it from the comments like this to the top answer).
So I created a folder with this at the beginning of the name on my Sharepoint drive and now it's there and I can't access it or delete it. :| – Rather Notsay Jun 28 '16 at 21:05
Of course, you can print them, but why make the things so unnecessarily complex? If you want to stay on the safe side, I would suggest using standard characters. Which is the last one depends on your File manager. So here is some code that creates a bunch of folders with all the printables strings in Python so you can test your file manager.
import os
import string
for i in string.printable:
try:
os.mkdir(i)
except OSError:
print('OSError for %s' %(I))
Once you have sorted by name you can get your answer.
For Windows 10 - Explorer
using standard characters after z
up to my knowledge there is only zz
and so on.
So using zzNameOfTheFolder
is an easy and safe way to do to that. So even if it's not nice I would recommend it.
For Mac OS X El Capitan - Finder
The z is the last character but note that there is no distinction between capital letters so a folder named zz
can't be stored in the same directory of a folder ZZ
For Ubuntu 16.04 - Nautilus
The hashtag #
is the last character. But if you want some more compatibility with other file managers I would use ZZ
.
Something more elegant than "z_item"?
I guess this depends on your own concept of elegance and I think StackOverflow should diffuse best and safest practices, not the most elegant. However, in many cases, symmetry can help. What about these safe perhaps more elegant solutions:
ZZFoldernameZZ
Zz-Folder name-zZ
zZ-Folder name-Zz
zZFolderNameZz
zzFoldernamezz