问题
Hi In a sample App I develop, I would like to retrieve the details of files modified in a particular time period.
Or simply... I have a time with me (say june 6th 2011 10:00 AM) and would like to get the list of files in a directory(say C:\MyFolder) which is modified after that partiicular time.
I have tried a method..
CFileFind finder;
szFile = _T("C:\\MyFolder\\*.*");
BOOL bFound = finder.FindFile( szFile );
CTime fileTime;
CTime fileCreateTime;
while ( bFound )
{
bFound = finder.FindNextFile();
finder.GetLastWriteTime(fileTime);
finder.GetCreationTime(fileCreateTime);
szFile = finder.GetFilePath();
if((startTime < fileTime) || (startTime < fileCreateTime))
{
......
Is there any other windows apis available for this or is there any better method than this..?
any one please reply...
Thanks in advance....
回答1:
Don't know the exact APIs, but I'd start here: http://msdn.microsoft.com/en-us/library/aa363798(VS.85).aspx
来源:https://stackoverflow.com/questions/6248474/how-can-i-get-the-files-modified-in-a-directory-in-a-particular-period-of-time-u