C# winform打开文件夹并选中指定文件
发布日期:2021-09-08 01:45:09 浏览次数:58 分类:技术文章

本文共 310 字,大约阅读时间需要 1 分钟。

例如:打开“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");

 

转载地址:https://blog.csdn.net/weixin_34310369/article/details/85608228 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Windows 8.1 新增控件之 Hyperlink
下一篇:mysql_fetch_row,mysql_fetch_array,mysql_fetch_object,mysql_fetch_assoc区别

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月06日 21时08分21秒