C # Open the file / hoplinks

mark about ~

open a file

1. Open the folder :

System.Diagnostics.Process.Start (FilePath); - Open the folder 
System.Diagnostics.Process.Start (FilePath + " / " + FileName); - Open a file folder

2. Open the file with IE:

System.Diagnostics.Process.Start("Explorer",FilePath+"\\"+FileName);

- " Explorer .exe", EXE can be omitted.

3. Open the folder and select individual files:

System.Diagnostics.Process.Start("Explorer", "/select,"+ FilePath+"\\"+FileName);

Note: There is a comma after the parameter "/ select".

Jump Links

  • Process.Start (url); - the default browser
  • Process.Start ( "iexplore.exe", url); - IE browser

Guess you like

Origin www.cnblogs.com/kybs0/p/11517524.html