C#打开文件夹并定位到指定的文件

1 public void PositionFile(string sFileFullName) 
2       { 
3           if (!System.IO.File.Exists(sFileFullName)) return; 
4   
5           System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explorer.exe"); 
6           //string file = @"c:/windows/notepad.exe"; 
7           psi.Arguments = " /select," + sFileFullName; 
8           System.Diagnostics.Process.Start(psi); 
9       } 

 

posted @ 2012-11-10 21:25  Lyghost  阅读(604)  评论(0编辑  收藏  举报