Imports System.IO
Public Class Tester
Public Shared Sub Main
Dim myDirectoryInfo As DirectoryInfo
myDirectoryInfo = New DirectoryInfo("c:\\")
Dim myDirectoryInfos() As DirectoryInfo
Dim myDir As DirectoryInfo
Try
myDirectoryInfos = myDirectoryInfo.GetDirectories("wind*")
For Each myDir In myDirectoryInfos
Console.WriteLine(myDir.FullName)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Class
|