您好,欢迎来到五一七教育网。
搜索
您的当前位置:首页使用c#打开文件夹及选中文件

使用c#打开文件夹及选中文件

来源:五一七教育网

引用:using System.Diagnostics;

打开文件夹:

System.Diagnostics.Process.Start(FilePath);

打开文件夹中某个文件:

System.Diagnostics.Process.Start(FilePath+"/"+FileName);

打开文件夹并选中单个文件:

System.Diagnostics.Process.Start("Explorer", "/select,"+ FilePath+"\"+FileName);

System.Diagnostics.Process.Start("Explorer.exe", "/select,"+ FilePath+"\"+FileName);

用IE打开文件:

System.Diagnostics.Process.Start("Explorer",FilePath+"\"+FileName);

System.Diagnostics.Process.Start("Explorer.exe",FilePath+"\"+FileName);

注:(explorer,explorer.exe,select,不区分大小写,"/selecet,"其中"/,"都不能少,FilePath为文件路径不包含文件名)

 打开文件夹并选中网页

System.Diagnostics.Process.Start("Explorer.exe", ”“);

 

 

 

转载于:https://www.cnblogs.com/deng02/archive/2012/06/25/2561336.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 517ttc.cn 版权所有 赣ICP备2024042791号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务