'****************************
'Recuperate traversal catalog
'Author: freedom Pentium (wgscd)
'E-mail: wgscd@126.com
Public Sub getDirectory (Byval String) Try Dim File As Fileinfo
Dim str As String Dim strs As String () = Directory.GetFiles (strpath) Dim subdirectory As String Dim subdirectoryEntries As String () = Directory.GetDirectories (strpath) For Each subdirectory In subdirectoryEntries For Each str In strs Me.Text = subdirectory file = New FileInfo (STR)
'If file.fullname like "* .jpg" OR file.fullname like "* .bmp" or file.fullname like "* .gif" or' file.fullname like "* .png" TEN 'can add the specified file You used! !
ListBox1.Items.add (file.fullname) 'Add to list me.text = file.fullname
'End if
Next str getdirectory 'recursive next subdirectory
Catch exception
END TRY