Hey all pretty new at this. Situation I am in. I can already bring up list of files in a director. Issues I am trying to figure out is.
Form 1
Button 1 - folder1
Button 2 - folder2
Button 3 - folder3
When a button is pushed then
Form2.Show() is done
form2 I have
So when somebody hit button 1 - 3 it will display whatever files are in that directory in the list box.
Form 1
Button 1 - folder1
Button 2 - folder2
Button 3 - folder3
When a button is pushed then
Form2.Show() is done
form2 I have
Code:
Dim directory = "c:\dir\" (i need folder# to insert after the dir\ but not sure how to send it.
Dim files() As System.IO.FileInfo
Dim dirinfo As New System.IO.DirectoryInfo(directory)
files = dirinfo.GetFiles("*", IO.SearchOption.AllDirectories)
For Each File In files
ListBox1.Items.Add(File)
Next