How to exclude certain file type when getting files from a directory?
I tried
var files = Directory.GetFiles(jobDir);
You could try something like this:
var allFiles = Directory.GetFiles(@"C:\Path\", ""); var filesToExclude = Directory.GetFiles(@"C:\Path\", "*.txt"); var wantedFiles = allFiles.Except(filesToExclude);