DirectoryInfo directory = new DirectoryInfo("D:\aa\"); FileInfo[] files = directory.GetFiles("*.*", SearchOption.AllDirectories); foreach (FileInfo dire in files) { //MessageBox.Show(dire.FullName); listBox1.Items.Add(dire.FullName); }
DirectoryInfo directory = new DirectoryInfo("D:\aa\"); FileInfo[] files = directory.GetFiles("*.*", SearchOption.AllDirectories); foreach (FileInfo dire in files) { //MessageBox.Show(dire.FullName); listBox1.Items.Add(dire.FullName); }