I have a folder contains quite a number of files with different extensions (eg: pdf, txt, etc). And, I want to extract the file names and put them into an Excel.
So under Assign, I have this code:
Files = Directory.GetFiles(“C:\folderpath”,".", SearchOption.AllDirectories).
Where(Function(s) s.EndsWith(".pdf") Or s.EndsWith(".txt")Or s.EndsWith(".pptx")).
But it only returned me three file names with each pdf, txt and pptx.
Any ideas how to read all the files?