Archolm
Member
- Joined
- Feb 9, 2011
- Messages
- 6
- Programming Experience
- Beginner
and then I want to display them in a listbox. It's for a little amateur project so i'm still very much a newbie when it comes to .net. I have gobbled together this code:
I was hoping to get the actual path and then used that to get a bunch of mp3 files paths from a folder. However the above code gives me nothing in return. Could anyone give me a clue as to why it doesn't?
VB.NET:
Dim theFolderBrowser As New FolderBrowserDialog
theFolderBrowser.Description = "Please select a folder for the download."
'theFolderBrowser.ShowNewFolderButton = False
'theFolderBrowser.RootFolder = System.Environment.SpecialFolder.Desktop
'theFolderBrowser.SelectedPath = My.Computer.FileSystem.SpecialDirectories.Desktop
If theFolderBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
Label1.Text = theFolderBrowser.SelectedPath
Dim di As New DirectoryInfo(Label1.Text)
Dim fi As FileInfo() = di.GetFiles()
Dim fiTemp As FileInfo
For Each fiTemp In fi
ListBox1.Text = (fiTemp.Name)
Next
End If
Last edited by a moderator: