Select folder in folder

What is the wrong in code
Please check

Directory.GetFiles(folderPath, “**”, SearchOption.AllDirectories).Where(Function(s)Path.GetExtension(s).TrimStart(“.”).ToLower().Equals(“xlsx”))


Getting an error when click ok

i want to read only excel files as there are multiple files are present in the subfolder

Hi @Arvind_Malik ,

Directory.GetFiles("FolderPath", "*.xlsx", SearchOption.AllDirectories)

This will get you all the excel file paths in the directory, the extension is not case sensitive,


Keep in mind, that GetExtension returns it with dot at the begin

So an Equals without dot is failling

However suggestion is an adequate option to retrieve excel files with wildcards