Open Folder in VB.Not

I want to open a folder in Windows Explorer, from code.
Can't figure out how to do it.  Suggestions please.
Thanks
LVL 1
jdhackettAsked:
Who is Participating?
 
ladarlingConnect With a Mentor Commented:
Or, alternately, you could use:
Shell("explorer c:\windows", AppWinStyle.NormalFocus, False)
The first example lets the OS decide how best to open the folder. It will use the default application for the file/url specified.
This example ensures that Windows Explorer opens it. This would be an important feature if you were trying to open files, urls, etc. with a specific application.
0
 
ladarlingCommented:
System.Diagnostics.Process.Start("C:\Windows")
0
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
You can also specify the application to use with Process.Start (instead of Shell):

    Dim folder As String = "c:\some\Folder"
    System.Diagnostics.Process.Start("Explorer", folder)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.