How to sort a List of FileInfo just like in a Windows folder? (Same sort Function)

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 1
Reputation: seahawk789 is an unknown quantity at this point 
Solved Threads: 0
seahawk789 seahawk789 is offline Offline
Newbie Poster

How to sort a List of FileInfo just like in a Windows folder? (Same sort Function)

 
0
  #1
Dec 11th, 2008
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...
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: How to sort a List of FileInfo just like in a Windows folder? (Same sort Function)

 
0
  #2
Dec 11th, 2008
Split the files into mainpart and extension, then sort without extension.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC