c#选择文件保存路径
2017-09-27 10:55
1451 查看
private void button3_Click(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.Description = "请选择文件路径"; if (dialog.ShowDialog() == DialogResult.OK) { string foldPath = dialog.SelectedPath; DirectoryInfo theFolder = new DirectoryInfo(foldPath); FileInfo[] dirInfo = theFolder.GetFiles(); //遍历文件夹 foreach (FileInfo file in dirInfo) { MessageBox.Show(file.ToString()); } } }
相关文章推荐
- C# 选择文件 选择路径 保存文件名称路径
- C#实现把用户第一次选择的路径保存到配置文件app.config中
- C#按键打开文件选择对话框,并把选择好的路径保存/显示到textBox
- VC打开文件对话框与保存文件路径选择对话框
- 在VC中如何使用对话框让用户选择自己保存文件的路径
- C#下载文件时候弹出选择文件夹保存目录的代码
- 关于创建Excel表格问题(保存至指定文件/弹出直接打开还是下载,并可以选择保存路径的对话框)
- C#项目打开/保存文件夹/指定类型文件,获取路径
- java选择保存文件的路径
- MFC打开文件选择框和多选框,保存文件夹的选择,保存文件路径的选择
- 简单的C# 保存内容到指定路径下的XML文件中方法
- MFC选择文件并保存到当前路径
- C#项目打开/保存文件夹/指定类型文件,获取路径
- C#下载文件时候弹出选择文件夹保存目录的代码
- JFileChooser 选择目录,选择保存路径,并对保存文件类型进行更改:
- C# 直接打印指定路径文件 + 可选择指定打印机
- C#项目打开/保存文件夹/指定类型文件,获取路径
- c# 打开文件自动保存路径
- c# 打开、保存文件对话框 和 文件夹选择对话框
- C#设置文件保存路径