Wildcard returning multiple items EnumerateFiles. Need to be more specific
I have a directory of pdfs.
I need to grab these pdfs based off of a number and currently have this:
var complianceFiles =
System.IO.Directory.EnumerateFiles(complianceDocumentPath,
salesOrder.CustomerNumber + "*.*",
System.IO.SearchOption.TopDirectoryOnly);
If I have two customers that contain similar customer numbers (i.e. 1234
and 12345) it is returning both. I should note that the documents contain
the number, as well as a unique title.
I know the issue is with my search pattern, any help is appreciated.