How to exclude certain file type when getting files from a directory?
I tried
var files = Directory.GetFiles(jobDir);
This is my version on the answers I read above
List fileInfoList = ((DirectoryInfo)new DirectoryInfo(myPath)).GetFiles(fileNameOnly + "*").Where(x => !x.Name.EndsWith(".pdf")).ToList();