Hi there @manu_debonne,
Interesting question and unfortunately, not one I have a perfect answer for.
As far as I am aware, you cannot exclude items from the GetFiles.
With that said, you can absolutely filter the results to exclude anything you want, as shown below: Assign - strMyDirectory = "C:\Sousrep" Assign - arrFilesToExclude = New String(1){"_validé.pdf", "“justificative.pdf”} Assign - arrFiles = Directory.GetFiles(strMyDirectory, "*.pdf") Assign - arrFiles = arrFiles.AsEnumerable().Where(Function (strFileName) Not(arrFilesToExclude.AsEnumerable.Any(Function (strFileToExclude) Path.GetFileName(strFileName).Contains(strFileToExclude)))).ToArray
The results of the above should be your Array of files, without any you require excluded.
Hopefully this helps!
Thanks in advance,
Josh