打开一个Windows eplorer到指定的路径 [英] Open a windows eplorer to specified path

查看:133
本文介绍了打开一个Windows eplorer到指定的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打开一个Windows资源管理器到我的项目的路径,但我得到的文件不存在。我在分区D中有项目而不在C中。

我使用的路径是文件夹的确切路径,因为我也使用了相对路径。

可以有人请告诉我怎样才能在确切的路径上打开一个文件夹?

谢谢。



我尝试了什么:



我试图使用此代码:

I am trying to open a windows explorer to the path where I have my project, but I am getting file does not exist. I have the project in partition D and not in C.
The path I am using is the exact path to the folder, because I used relative paths also.
Can someone please tell me how can I open a folder on the exactpath?
Thanks.

What I have tried:

I tried to use this code:

//exactpath is the full path to the folder I want to open, but there is no file, just a folder.
System.Diagnostics.Process.Start( exactpath );

推荐答案





试试这个:



Hi,

try this:

string filePath = @"...";
System.Diagnostics.Process.Start("explorer.exe", string.Format("/select, \"{0}\"", filePath));


这篇关于打开一个Windows eplorer到指定的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆