Look at using the Directory.GetFiles method override that includes a search string:
Directory.GetFiles Method (System.IO) | Microsoft Docs[
^] - it returns an array of matching files.
The search string can't include negatives though, so there are two solutions:
1) Call GetFiles twice: once to get all "*.txt" files, and once to get just "*123*.txt" files. You can then use the Linq Except method to exclude them, giving you a list of files to delete.
string[] all = Directory.GetFiles(path, "*.txt");
string[] match = Directory.GetFiles(path, "*123*.txt");
var toDelete = all.Except(match);
You may have to change the sel3ect criteria if the folder path can contain the search string with teh second option.
2) Call Getfiles once to get all "*.txt" files, and then use the Linq Where method to remove the ones you want to keep:
string[] all = Directory.GetFiles(path, "*.txt");
var toDelete = all.Where(f => !f.ToLower().Contains("man"));