Directory.GetFiles with a List of Files

Directory.GetFiles(YourDirPath, “Test*.xlsx”) for a prefiltering
Or
Filtering before for each e.g.
arrFiles = Directory.GetFiles(YourDirPath)
arrMask = {“Test1”,“Test3”}
arrFilesFiltered = arrFiles.Where(Function (x) arrMask.Any(Function (f) x.Contains(f))).toArray

3 Likes