Textbox1.Text = part
'searching the folder with key word from Textbox1'
' Only get files that contain the keyword stored in 'part' string
Dim dirs As String() = Directory.GetFiles("d:\data\", "*$part*")
'display the result
Dim dir As String
For Each dir In dirs
Listbox1.Items.Add(dir)
Next
我无法让它在文件夹中搜索名称中包含关键字的文件。关键字存储在“part”变量中。