DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   How to sort a List of FileInfo just like in a Windows folder? (Same sort Function) (http://www.daniweb.com/forums/thread161817.html)

seahawk789 Dec 11th, 2008 1:22 pm
How to sort a List of FileInfo just like in a Windows folder? (Same sort Function)
 
How to sort a List of FileInfo(in C#.NET) just like in a Windows folder? (Same sort

function)

For eg. consider a set of files

b (1).txt
b.txt
b (2).txt

In Windows if we arrange by name the output will be
b.txt
b (1).txt
b (2).txt

When I used FileInfo the list contained files as
b (1).txt
b (2).txt
b.txt

I want it to be sorted as in Windows
Please Help me...

LizR Dec 11th, 2008 1:32 pm
Re: How to sort a List of FileInfo just like in a Windows folder? (Same sort Function)
 
Split the files into mainpart and extension, then sort without extension.


All times are GMT -4. The time now is 9:47 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC