Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

The sort order for files and folders whose names contain numerals is incorrect, such as my actually sort result is as following:

Ie4_01 Ie4_128 Ie401sp2 Ie5 Ie501sp2 Ie6

But my expected result is:

Ie4_01 Ie4_128 Ie5 Ie6 Ie401sp2 Ie501sp2

The issue is just as here http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/76b6f4d9-db1e-40a9-8407-13b8bcf6c1c3/ stated.

How can I resolve this issue? Thank you.

share|improve this question

2 Answers 2

During a sort, the values are compared character by character.

This is normal behavior. 4 < 5 < 6, so that's how they should be sorted.

A < B < C, but you don't expect AZ to come after BA, because A < B

share|improve this answer
If you sort these folders in Windows explorer, you will find the result is different –  Troy Aug 21 '12 at 13:39

What you want is a alphanumeric sorting using an IComparer interface


share|improve this answer
Is there any way that don't need programing? Thanks –  Troy Aug 21 '12 at 14:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.