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");

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM