嗨,在我开发的示例应用程序中,我想检索在特定时间段内修改的文件的详细信息。
或者干脆..。我有一个时间(例如2011年6月6日上午10:00 ),我想获得一个目录(例如C:\MyFolder)中的文件列表,该目录在该分区时间之后被修改。
我试过一种方法..
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))
{
......有没有其他的windows apis可以做这件事,或者有比这更好的方法?
任何人请回复...
提前感谢....
发布于 2011-06-06 14:33:30
不知道确切的API,但我会从这里开始:http://msdn.microsoft.com/en-us/library/aa363798(VS.85).aspx
https://stackoverflow.com/questions/6248474
复制相似问题