For the moment I can only get the subfolders name of C:\Backup folder to the first column of the listBoxComputer.
Have do I get also the last written date of subfolders to the second column of the listBoxComputer?
Have do I get also the last written date of subfolders to the second column of the listBoxComputer?
C#:
private string rootDir = @"C:\Backup";
private void FormView_Load(object sender, EventArgs e) {
List<string> ls = Directory.GetDirectories(rootDir).Select(Path.GetFileName).ToList();
ls.Sort((a, b) => -1 * a.CompareTo(b));
listBoxComputer.Sorted = false;
listBoxComputer.DataSource = ls;
listBoxUser.SelectedIndex =-1;
}
Last edited by a moderator: