This can be a handy functionality to have in a program that works with files/folders. It\'s easy enough to actually open the containing folder using:
System.
Execute Explorer.exe with /select, "filename"
command line argument
System.Diagnostics.Process.Start(
"explorer.exe",
string.Format("/select, \"{0}\"", filename));
Containing folder, Self directory is represented in many ways!!!
Simple 2 ways are .
and, .\.
no idea what is the difference!.. :D
From DOS and bat files... Start .
or Start .\.
(Y)
Try... these 2 works, but check whether this is the solution u expect!
System.Diagnostics.Process.Start("explorer.exe", @".\.");
Or
System.Diagnostics.Process.Start("explorer.exe", @".");
-
According to Windows Explorer Command-Line Options you just need to start an explorer
process with /select
parameter.
For instance, 'explorer /select,c:\Windows
' will open a window with c:\windows
folder selected.
So simply Process.Start("explorer.exe", "/select," + filename)
should be enough.