You can get the number of files in a folder by doing something like this:
vb Code:
  1. Dim counter As Collections.ObjectModel.ReadOnlyCollection(Of String)
  2.         counter = My.Computer.FileSystem.GetFiles("C:\Temp\")
  3.         MessageBox.Show("Found: " & counter.Count.ToString & " files")

If Counter.Count = 0 then no files exist. Just set up your loops etc... to check the value first. If the directory file count doesn't equal 0 then loop through each file and attach. If number of files in a folder does equal 0 then move on to next folder or whatever.