I found the solution. The code works fine but doesn’t listing in excel files. but listing subfolders and inside of the excel files.
I mean lets say, we have Todays Folder and includes 2 folder and 5 excel file inside of it.
What i want is that => listing that 5 excel files. but the code is listing excel files of inside of the that 2 folders.
getFolders = Directory.GetDirectories(FolderLocation)
Console.WriteLine("Number of Folder : " + getFolders.Count.ToString)
getFiles = Directory.GetFiles(FolderLocation)
Console.WriteLine("Number of Files : " + getFiles.Count.ToString)
For Each Folder As String In getFolder
lst_KeepFolder.Add(Folder)
Console.WriteLine("Folder : " + lst_KeepFolder.Item(myCounter))
Excels = Directory.GetFiles(lst_KeepFolder.Item(myCounter).ToString,"*xls")
For Each Files As String In Excels
lst_KeepExcelDoc.Add(Files)
Console.WriteLine(lst_KeepFolder.Item(myCounter).ToString + " -> " + Files.Substring(36)) 'I have an excel files but does not listing.
Next
Next
Thank you