我编写了下一个代码,该代码为我提供了包含/ DocXML中文件的列表。
我想要获取具有最早创建日期的文件。我该怎么做?
谢谢大家。
private void button2_Click(object sender, EventArgs e)
{
ftp.DownloadFile(textBox1.Text, textBox7.Text);
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://192.168.47.1/DocXML");
request.Method = WebRequestMethods.Ftp.ListDirectory;
request.Credentials = new NetworkCredential("username", "password");
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);
string names = reader.ReadToEnd();
textBox12.Text = names;
}