vb Code:
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         Using fbd As New FolderBrowserDialog
  5.             If fbd.ShowDialog = Windows.Forms.DialogResult.OK Then
  6.                 For Each foundFile As String In IO.Directory.GetFiles(fbd.SelectedPath, "*.wav", IO.SearchOption.AllDirectories)
  7.                     If ListBox1.FindStringExact(foundFile) > -1 Then
  8.                         ListBox2.Items.Add(foundFile)
  9.                     Else
  10.                         ListBox3.Items.Add(foundFile)
  11.                     End If
  12.                 Next
  13.             End If
  14.         End Using
  15.  
  16.     End Sub
  17. End Class