I am currently using the below .net code to retrieve the last modified file:
new DirectoryInfo(Path).GetFiles().OrderByDescending(Function(f) f.LastWriteTime).First().ToString
However there needs to be a extra validation to exclude the file name “summary.pdf” even if its the latest and consider only the remaining files names .
Could you please help on how to get the most recent file in a directly excluding a specific file name?
Thank you in advance.