开发者

How can I preselect a file in windows explorer using .net?

How can I popup a windows explorer on a 开发者_如何学Pythonspecific folder with a specific file highlighted ?

I'm interested in solutions for XP, Vista and Windows 7.


There's a "/select" switch in explorer.exe:

"/select,FileName" 

You can use the Process.Start to execute it.


See Explorer.exe Command-Line Options for Windows XP at http://support.microsoft.com/kb/314853

/select,<object> Opens a window view with the specified folder, file, or program selected.

Example 1: Explorer /select,C:\TestDir\TestProg.exe (Opens a window view with TestProg selected.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜