I have over a thousand folders, each folder contains one or more files with the following names:
Unordered:
Alison.ext Heather.ext Molly.ext Paula.ext Sam.ext
You can store the desired order list in an array
int[] iIndex = {3,2,0,4, 1};
Say str holds your unordered List
List str = new List();
str.Add("Alison.ext");
str.Add("Heather.ext");
.
.
.
Add your list and corresponding order into a datatable
DataTable dt = new DataTable();
dt.Columns.Add("Order", typeof(Int32));
dt.Columns.Add("Name");
for (int iCount =0; iCount< str.Count ; iCount ++)
{
DataRow drow1 = dt.NewRow();
drow1[0] = iIndex[iCount];
drow1[1] = str[iCount];
dt.Rows.Add(drow1);
}
dt.AcceptChanges();
Fynally Order yuor list to get yuor expected list
var result = from ls in dt.AsEnumerable()
orderby ls.Field("Order")
select ls;