This example shows how to get a list of all executables in a specified directory. The System.IO reference must be imported.
Imports System.IO
Dim d As DirectoryInfo = New DirectoryInfo("C:\")
For Each File As FileInfo In d.GetFiles("*.exe")
Console.WriteLine(File.Name)
Next