您的位置:首页 > 编程语言 > C#

C#打开指定目录,并将焦点放在指定文件上。相对路径(程序起动的目录)

2013-06-28 08:50 756 查看
string basepath = AppDomain.CurrentDomain.BaseDirectory;
string filepath = "logs\\Log.log";
string path = basepath + filepath;
//   System.Diagnostics.Process.Start("explorer.exe", path);
System.Diagnostics.ProcessStartInfo psi = new   System.Diagnostics.ProcessStartInfo("Explorer.exe");
psi.Arguments = "/e,/select," + path;
System.Diagnostics.Process.Start(psi);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐