Hi guys I have the code to get the directory list of the xml files in an folder but the problem is that i want to get the files in the creation date order. in other words each file has got an date it was created. now i want to load all these xml files into an list array and in the creation date order. is this possible? :confused: my code sofar:
private String\[\] GetDirectory(String XmlFilePath)
{
List<String> strList = new List<string>();
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(XmlFilePath);
request.Credentials = new NetworkCredential(Username, Password);
request.Method = WebRequestMethods.Ftp.ListDirectory;
StreamReader sr = new StreamReader(request.GetResponse().GetResponseStream());
while (!(sr.EndOfStream))
{
strList.Add(sr.ReadLine());
}
sr.Close();
sr = null;
return strList.ToArray();
}