0

Possible Duplicate:
Open Folder and Select the file

I have a path of a file.

I want to open its directory and mark him in the directory by clicking him.

I tried this:

System.Diagnostics.Process.Start(path);

and this:

System.Diagnostics.Process.Start(new FileInfo(Path).Directory.FullName);
Community
  • 1
  • 1
user1430430
  • 21
  • 1
  • 6

1 Answers1

0

How About

Process.Start("explorer.exe", @"c:\file.name");

Svarog
  • 2,188
  • 15
  • 21
  • thank you but it doesnt work this action open the file...a – user1430430 Sep 10 '12 at 09:42
  • success: string p = @"C:\tmp\this path contains spaces, and,commas\target.txt"; string args = string.Format("/e, /select, \"{0}\"", p); ProcessStartInfo info = new ProcessStartInfo(); info.FileName = "explorer"; info.Arguments = args; Process.Start(info); – user1430430 Sep 10 '12 at 09:55