DirectoryInfo Class Exposes instance methods for creating, moving, and enumerating through directories and subdirectories : DirectoryInfo « File Directory « VB.Net
DirectoryInfo Class Exposes instance methods for creating, moving, and enumerating through directories and subdirectories
Imports System Imports System.IO
Public Class Test Public Shared Sub Main() Dim di As DirectoryInfo = New DirectoryInfo("c:\MyDir") Try
' Try to create the directory.
di.Create()
' Delete the directory.
di.Delete() Catch e As Exception
Console.WriteLine("The process failed: {0}", e.ToString()) End Try End Sub End Class