谢谢!
火急!
3 个解决方案
#1
Dim di As IO.DirectoryInfo = New IO.DirectoryInfo("d:\")
Dim dii() As IO.DirectoryInfo = di.GetDirectories
''取所有文件
Dim fii() As IO.FileInfo = di.GetFiles("*.txt", IO.SearchOption.AllDirectories)
#2
Dim dir As System.IO.DirectoryInfo = New DirectoryInfo("")
For Each item As System.IO.FileInfo In dir.GetFiles("*.jpg", SearchOption.AllDirectories)
//item.FullName
Next
For Each item As System.IO.FileInfo In dir.GetFiles("*.jpg", SearchOption.AllDirectories)
//item.FullName
Next
#3
1楼、2楼的方法都可
#1
Dim di As IO.DirectoryInfo = New IO.DirectoryInfo("d:\")
Dim dii() As IO.DirectoryInfo = di.GetDirectories
''取所有文件
Dim fii() As IO.FileInfo = di.GetFiles("*.txt", IO.SearchOption.AllDirectories)
#2
Dim dir As System.IO.DirectoryInfo = New DirectoryInfo("")
For Each item As System.IO.FileInfo In dir.GetFiles("*.jpg", SearchOption.AllDirectories)
//item.FullName
Next
For Each item As System.IO.FileInfo In dir.GetFiles("*.jpg", SearchOption.AllDirectories)
//item.FullName
Next
#3
1楼、2楼的方法都可