Heres how you can do stuff to files with a certain file extension.
Copy N Paste Code underneith showcase code
ShowCase
VB.NET Code:
  1. For Each foundFile As String In IO.Directory.GetFiles("DIRECTORY", "WILDCARD")
  2.                     Dim FilenameWextension As String = GetFileNameFromPath(foundFile)
  3. 'DO WHAT YOU WANT HERE
  4.                 Next
  5.  
  6. Public Function GetFileNameFromPath(ByVal Path As String) As String
  7.         Try
  8.             Return Path.Substring(Path.LastIndexOf("\") + 1)
  9.         Catch ex As Exception
  10.             Return Path
  11.         End Try
  12.     End Function

C'n'P
Code:
For Each foundFile As String In IO.Directory.GetFiles("DIRECTORY", "WILDCARD")
                    Dim FilenameWextension As String = GetFileNameFromPath(foundFile)
'DO WHAT YOU WANT HERE
                Next

Public Function GetFileNameFromPath(ByVal Path As String) As String
        Try
            Return Path.Substring(Path.LastIndexOf("\") + 1)
        Catch ex As Exception
            Return Path
        End Try
    End Function