I am able to retrieve all the files from the specified folder using following line.
string[] filePaths = Directory.GetFiles(@"c:\MyDir\");
On UI I will have 2 parameters --
Startdate and Starttime
EndDate and Endtime
I want to retrieve only those files where Date Modified of files (in the windows explorer) is in between startdatetime and enddatetime
Any clue?
Wim SturkenboomPosted Sep 26, 2014, 10:12 AM
System.IO.FileInfo fi = new System.IO.FileInfo(filePaths[somecounter]);
DateTime dtCreation = fi.CreationTime;
DateTime dtModified = fi.LastWriteTime;
I assume that you can do the compare yourself, if not let us know.
Note
It's very well possible that the lastwritetime is before the creation time. Don't be surprised. It's stupid, but it's the case.