vb实现查找某一文件夹下所有的文件

Dim DirInfo As DirectoryInfo = New DirectoryInfo(sPath)
Dim FInfo() As FileInfo
FInfo = DirInfo.GetFiles
Dim F(FInfo.Length) As String
Dim tmpFInfo As FileInfo
Dim i As Integer = 0
For Each tmpFInfo In FInfo

F(i) = tmpFInfo.Name
MsgBox(F(i))

Next

vb实现查找某一文件夹下所有的文件
sPath是指定的文件夹路径

Leave a Reply