Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
Dim dir As New IO.DirectoryInfo(TextBox1.Text)
Dim fname As IO.FileInfo
Dim fname2 As IO.DirectoryInfo
For Each fname In dir.GetFiles()
ListBox1.Items.Add(fname)
Next
For Each fname2 In dir.GetDirectories()
ListBox1.Items.Add(fname2)
Next
End Sub
End Class
vnote
For Each foundDir As String In My.Computer.FileSystem.GetDirectories("폴더")
Dim fi2 As New IO.DirectoryInfo(foundDir)
MsgBox(fi2.Name)
Next
이 댓글을