Numeric Sort in Document Selector
Posted: Tue Jan 20, 2004 6:18 pm
Sometimes I have to open 100 or more documents in the document selector. These documents often have file numbering suffixes, like this:
document1.txt
document2.txt
document3.txt
document4.txt
document5.txt
...or like this...
document.txt_1
document.txt_2
document.txt_3
document.txt_4
document.txt_5
...and sometimes (rarely), they have prefixes, like this...
1_document.txt
2_document.txt
3_document.txt
4_document.txt
5_document.txt
The document selector sorts by ASCII character values, so it starts to fall apart if you have more than 10 documents. They end up getting sorted like this:
document.txt_1
document.txt_10
document.txt_100
document.txt_11
document.txt_12
document.txt_13
document.txt_14
document.txt_15
document.txt_16
document.txt_17
document.txt_18
document.txt_19
document.txt_2
document.txt_20
document.txt_21
document.txt_22
...
Windows XP introduced numeric sorting into the windows explorer, so that the files get displayed in the more sensible numeric order. It would be nice to have something similar in TextPad's document selector, so that a directory full of numbered documents gets sorted numerically.
document1.txt
document2.txt
document3.txt
document4.txt
document5.txt
...or like this...
document.txt_1
document.txt_2
document.txt_3
document.txt_4
document.txt_5
...and sometimes (rarely), they have prefixes, like this...
1_document.txt
2_document.txt
3_document.txt
4_document.txt
5_document.txt
The document selector sorts by ASCII character values, so it starts to fall apart if you have more than 10 documents. They end up getting sorted like this:
document.txt_1
document.txt_10
document.txt_100
document.txt_11
document.txt_12
document.txt_13
document.txt_14
document.txt_15
document.txt_16
document.txt_17
document.txt_18
document.txt_19
document.txt_2
document.txt_20
document.txt_21
document.txt_22
...
Windows XP introduced numeric sorting into the windows explorer, so that the files get displayed in the more sensible numeric order. It would be nice to have something similar in TextPad's document selector, so that a directory full of numbered documents gets sorted numerically.