取得資料夾中特定格式檔案路徑並存入ArrayList
介面:程式碼:
Public Class Form1
Dim file As New ArrayList
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each filetmp As String In My.Computer.FileSystem.GetFiles(TextBox1.Text, FileIO.SearchOption.SearchTopLevelOnly, "*." & TextBox2.Text)
file.Add(filetmp)
Next
For y = 0 To file.Count - 1
ListBox1.Items.Add(file(y))
Next
End Sub
End Class
