Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim arrDirs() As String 'declare an array for all the files Dim strDir As String 'declare string for directory Try 'get all the files inputted in the inputted directory of textbox1 arrDirs = Directory.GetFiles(TextBox1.Text) 'create a for each loop to pass all the files into the string variable For Each strDir In arrDirs 'add the files to the lisbox ListBox1.Items.Add(strDir) Next Catch ex As Exception 'if directory doesnt exist, it will promt the user that the path doesnt exist MessageBox.Show(ex.Message) End Try End Sub