C# winform打开文件夹并选中指定文件

例如:打开“E:\Training”文件夹并选中“20131250.html”文件

System.Diagnostics.Process.Start("Explorer.exe", @"/select,E:\Training\20131250.html");

一句代码搞定!!!

扩展:

1)只打开文件夹:

System.Diagnostics.Process.Start("Explorer.exe", @"E:\Training");

2)打开文件夹并选中文件夹

System.Diagnostics.Process.Start("Explorer.exe", @"/select,E:\Training\js");

 

相关文章:

  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2021-06-17
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-07-25
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案