Reading File Names in Folder aswell as in SubFolders.

  • Thread starter Thread starter VB Novice Hendri
  • Start date Start date
V

VB Novice Hendri

Guest
Hi There.

I use this code to give me a list of all MS Word Documents in a Folder.

I need some code that will not only give me the names in that Folder but the Names in all SubFolders aswell.

Can you please Help.

RecipeFolder = "M:\My Documents\My Resepte\Wenke & Boererate vir in en om die Huis\Huishoudelike Wenke"


Sub FillRecipeListBox()

Me.RecipeListBox.Items.Clear()
Dim Files() As String = Directory.GetFiles(RecipeFolder)
For Each file As String In Files
RecipeListBox.Items.Add(Path.GetFileNameWithoutExtension(file))
Next

End Sub

Continue reading...
 

Similar threads

V
Replies
0
Views
110
VB Novice Hendri
V
V
Replies
0
Views
122
VB Novice Hendri
V
V
Replies
0
Views
126
VB Novice Hendri
V
V
Replies
0
Views
89
VB Novice Hendri
V
V
Replies
0
Views
141
VB Novice Hendri
V
Back
Top