Code helping trying to exclude a specific folder

I have the code where am I searching trough a direcory. But now I need the help the exclude one folder where I dont want to search. Till now this code is working but without exluding the folder called “nicht definiert”


Can anyone help?


How about the following expression?

Directory.GetFiles("C:\Users\msauro\Desktop\Tester","PL_*.pdf",SearchOption.AllDirectories).Where(Function(s) not s.Contains("\nicht definiert")).ToArray()
1 Like

no its still writing the files from this folder in the write line activity. Do you have an other code maybe?

tried with this one: Put the whole path Directory.GetFiles(“C:\Users\msauro\Desktop\Tester”,“PL_*.pdf”,SearchOption.AllDirectories).Where(function(s) NOT s.Contains(“C:\Users\msauro\Desktop\Tester\nichtdefiniert”)).ToArray()

Thanks for your input with ToArray()

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.