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); }
时间: 2024-12-28 15:07:38