ARTICLE
How to find various folder path in VB.NET
In this article you will learn how to find various folder path in VB.NET.
SpecialFolder Path Environment Class provides information about current environment and platform that we are using. If we want to use some special folder path that are created on the time of operating system installation such as Program Files, Programs, History CommonProgramFiles ApplicationData or MyMusic, we can use GetFolderpath method of Environment class of System namespace . GetFolderpath method returns the path to the system special folder identified by the specified enumeration.
Example:
Dim FolderPath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Folder Name enumerations
Application Executable Path
If we want to know application execution path than we can use StartupPath property of Application object.
Dim FolderName As String = Application.StartupPath