Select folder in folder

Hi
What is the wrong in code
Please check

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

Thanks

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,

Regards,

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

So an Equals without dot is failling

However @vishal.kp suggestion is an adequate option to retrieve excel files with wildcards