FolderBrowserDialog用来选择文件夹
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog()
之后才会打开文件夹选择框。
dialog.SelectedPath是选择的文件夹的完整路径
DirectoryInfo theFolder = new DirectoryInfo(foldPath);
FileInfo[] dirInfo = theFolder.GetFiles();
得到这个文件夹中的文件列表(数组形式)供使用。