Open a folder and highlight a particular file with WPF Open a folder and highlight a particular file with WPF wpf wpf

Open a folder and highlight a particular file with WPF


Explorer Command Line Arguments
http://support.microsoft.com/kb/152457

Explorer [/n] [/e] [(,)/root,<object>] [/select,<object>]/n                Opens a new single-pane window for the default                  selection. This is usually the root of the drive Windows                  is installed on. If the window is already open, a                  duplicate opens./e                Opens Windows Explorer in its default view./root,<object>    Opens a window view of the specified object./select,<object>  Opens a window view with the specified folder, file or                  application selected.

You will also want to put quotes around the filename like so:

startInfo.FileName = "explorer.exe";startInfo.Arguments = "/select,\"" + ConfigFile.File.FullName + "\"";