I need certain files to be the last in the file list when sorted by name, for easy spotting. Since tilde is the last char in the ASCII table, I thought of using it as the first char in the name of those files. Yet, the files are still appearing before those starting with [a-z,A-Z]. Is there any way I can change this behavior and stick to strict ASCII order?
Windows uses Unicode, not ASCII, and the order of characters (or combinations of characters sometimes) also depends on your system's locale. A tilde may sort to the top in one locale and the bottom in another.
I already tried that, no success. And you are right, I forgot that Windows (NTFS, actually) uses Unicode. But who decides the ordering of the file name list obtained through file API? Isn't that the task of the calling app? AFAIK FindFirstFile/FindNextFile don't have any ordering flags, they just go with the physical order of file system entries and the calling app will sort the results in any way it wishes. Feel free to correct me if I'm wrong.