VB.NET:
' Get all sub directories
For Each sfolder As String In IO.Directory.GetDirectories(ssfolder)
ListBox1.Items.Add(sfolder)
Next
'list all file in current directory end with .jpg
For Each fsfolder As String In IO.Directory.GetFiles(ssfolder, "*.jpg")
ListBox1.Items.Add(fsfolder)
Next