16,722
社区成员




Public Class Form1
Private Sub GetAllFile(ByVal path As String)
Dim strDir As String() = System.IO.Directory.GetDirectories(path)
Dim strFile As String() = System.IO.Directory.GetFiles(path)
Dim i As Integer
If strDir.Length > 0 Then
For i = 0 To strDir.Length - 1
Debug.Print(strDir(i))
Next
End If
If strFile.Length > 0 Then
For i = 0 To strFile.Length - 1
Debug.Print(strFile(i))
Next
End If
If strDir.Length > 0 Then
For i = 0 To strDir.Length - 1
GetAllFile(strDir(i))
Next
End If
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GetAllFile("e:\PIC")
End Sub
End Class