you can use something like this :
string [] filePaths = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories);
instead of using "." you can type the name of the file or just the type like "*.txt" also SearchOption.AllDirectories is to search in all subfolders you can change that if you only want one level more about how to use it on here