views:

110

answers:

2

When using Chrome, if you download a file you can then choose an option (Show in Folder) which will open the containing directory and highlight the file. Similarly, if you view the properties of a shortcut you can choose the "Find Target" button for that same functionality. I have tried numerous searches, as well as looking over a decent portions of the MSDN entry on Shell Functions, but to no avail. I assume it's just a simple API call, or series thereof, but I'm not finding it.

+6  A: 

At the very least, you can do that by invoking "explorer.exe /select,C:\path\to\file". I'm not sure if there is an equivalent API call.

[edit] Here's the Microsoft KB article on Explorer command line switches

Rytmis
Ya this is how it is done. "explorer.exe /open,C:\SomeFolder\Somefile.txt" to OPEN it. Also to open special folders like 'My Documents', 'Favorites' etc you need to specify their unique Ids
A9S6
+1  A: 

Here is an article that shows how to select files programmatically: Windows Explorer wildcard selection shell extension

Giorgi