get all the file apart from txt from directory in c# code example
Example: c# list all files in a directory and subdirectory
string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);
string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);