Get and Set Current Directory in VB.NET
In this article I describe how to get and set the current directory.
Get and Set Current Directory
The SetCurrentDirectory method sets the specified directory as the current directory. The GetCurrentDirectory method returns the current directory.
Imports System.IO
Module Module1
Sub Main()
Dim root As String = "C:\Temp"
Directory.SetCurrentDirectory(root)
Console.WriteLine(Directory.GetCurrentDirectory())
Console.ReadLine()
End Sub
End Module
Output: