Getting count of files modified today and of particular file type

Hi,

I have the below which gets files modified today. How do i modify it to get only .OUT files?

directory.GetFiles(“FILEPATH”).where(Function(x) New FileInfo(x).LastWriteTime.Date = DateTime.today.date).Count

One option could be:
directory.GetFiles(YourFilePath,"*.OUT").where(Function(x) New FileInfo(x).LastWriteTime.Date = DateTime.today.date).Count

Or go for
new DirectoryInfo(YourFilePath).GetFiles("*.xaml").Where(Function (x) x.LastWriteTime.Date = DateTime.today.date).Count

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.