I need to store target excel file to String value but sometimes there is no target excel file on specific folder. Than I’d like to proceed to next folder without error.
How to configure like below procedure?
Check each folder and store target excel file like below
Code: Directory.GetFiles(“C:\P00432_FundReport\bank statement\HSBC 001”,"*.xlsx").Where(function(d) Path.GetFileName(d).Contains(“AISTMTPRINT”+DateTime.Now.ToString(“yyyy-MM-dd”)))(0)
If there is no target excel file than pass and check next folder
How to build this logic?