I have a folder of word documents from which I need to extract the country names dynamically. Each file has just one country but multiple occurrences. I need to extract the first occurrence. Can someone please give a logic for this.
Hi @kumarmanjeetcr7
Try this
System.IO.Directory.GetFiles(“FilePath”, “*.xlsx”).ToList().Where(Function(a) a.Contains(“CountryName”)=True).FirstOrDefault()