how to get all files in a top directory c# code example
Example 1: list all files in directory and subdirectories c#
string[] entries = Directory.GetFileSystemEntries(path, "*", SearchOption.AllDirectories);
Example 2: get all files in all subdirectories c#
Directory.GetFiles(dirPath, "*", SearchOption.AllDirectories)