Imports System.IO
public class Test
public Shared Sub Main
Dim aryItems() As String
Dim strPath As String = "C:\Program Files"
Dim strItem As String
aryItems = Directory.GetFileSystemEntries(strPath)
For Each strItem In aryItems
If Directory.Exists(strItem) Then
Console.WriteLine("FOLDER " & strItem)
Else
Console.WriteLine("FILE " & strItem)
End If
Next strItem
End Sub
End class
FOLDER C:\Program Files\Adobe
FOLDER C:\Program Files\AMD
FOLDER C:\Program Files\ATI Technologies
FOLDER C:\Program Files\Common Files
FOLDER C:\Program Files\ComPlus Applications
FOLDER C:\Program Files\CONEXANT
FOLDER C:\Program Files\ftp
FOLDER C:\Program Files\HPQ
FOLDER C:\Program Files\InstallShield Installation Information
FOLDER C:\Program Files\Internet Explorer
FOLDER C:\Program Files\Messenger
FOLDER C:\Program Files\microsoft frontpage
FOLDER C:\Program Files\Microsoft Office