views:

47

answers:

2

How can I popup a windows explorer on a specific folder with a specific file highlighted ?

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

+7  A: 

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

"/select,FileName" 

You can use the Process.Start to execute it.

Sphynx
Amazing! I would have voted more if I could :)
Ismail
+1  A: 

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.)

AMissico