Dereleased
Dereleased

Reputation: 10087

How to reproduce "Show in Folder" / "Find Target" via C#

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.

Upvotes: 4

Views: 1604

Answers (2)

Giorgi
Giorgi

Reputation: 30873

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

Upvotes: 1

Rytmis
Rytmis

Reputation: 32037

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

Upvotes: 7

Related Questions