0

Hi I searched the web and found the example Open a folder using Process.Start to open the folder. I followed it and created a console app but the folder is opened my document folder instead of my input folder. For my testing, I executed it in cmd prompt by typing "\sharefuser01\users$\tester\2012". It opened the "\sharefuser01\users$" folder. Would someone tell me how to do it. Thanks in advance.

There is my code:

Sub Main(ByVal args() As String)
           Dim psi As New ProcessStartInfo(args(0))
            Process.Start("explorer.exe", args(0))

End Sub
Community
  • 1
  • 1
user819774
  • 1,456
  • 1
  • 19
  • 48

1 Answers1

0
Process.Start("directory path")

or

Dim Proc As String = "Explorer.exe"

Dim Args As String =
   ControlChars.Quote &
   IO.Path.Combine("C:\", "Folder with spaces in the name") &
   ControlChars.Quote

Process.Start(Proc, Args)
EAK TEAM
  • 5,726
  • 4
  • 30
  • 52