Have a look at the DirectoryInfo class in the System.IO namespace, C# code but simple to convert!
string directoryPath = @"C:\FolderToSearch";
DirectoryInfo dir = new DirectoryInfo(directoryPath);
FileInfo[] files = dir.GetFiles("*.csv", SearchOption.AllDirectories);
foreach (FileInfo file in files)
{
}