How to get the path of the recent or latest file based on creation time (say ‘test.xml) located in many sub directories within a main directory.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use LINQ:
If you’re not using .Net 4.0, change that to
This is somewhat slower, but will work in .Net 3.5.