如何用c#打开文件夹并选择文件夹内的一个文件 open folder and select file

如何用c#打开文件夹并选择文件夹内的一个文件 open folder and select file:

在运行中可以输入“Explorer /select,D:\somefile.txt”达到打开文件夹并选择文件夹内的一个文件的目的,知道这个在程序中处理就很简单了. 

private void OpenFolderAndSelectFile(string filePath) {
    System.Diagnostics.Process.Start("Explorer", "/select," + filePath);
}
posted @ 2010-03-09 13:06  玉开  阅读(3993)  评论(6编辑  收藏  举报