我想检查文件夹是否大于30天,并有下面的代码如何comapre 2个FILETIME变量,看是否有文件是超过30天
static bool ExpiredDirectory(CComBSTR directory)
{
WIN32_FILE_ATTRIBUTE_DATA fileAttrData = {0};
GetFileAttributesEx(directory, GetFileExInfoStandard, &fileAttrData);
FILETIME ftCreatedDate = fileAttrData.ftCreationTime;
FILETIME now;
SYSTEMTIME nowst;
ULARGE_INTEGER t1, t2;
GetSystemTime(&nowst);
SystemTimeToFileTime(&nowst, &now);
---compare code goes here
}
我想比较上面的变量以查看ftCreatedDate是否大于30天
退房的CompareFileTime功能。 – 2013-05-02 14:14:46
谢谢,但比较文件时间只能比较和说哪两个是最大的。我想检查比例,例如它是否大于30天 – John 2013-05-02 14:28:28
是真的,但标题没有提到30天的位,所以其他具有相同问题的人不会知道这个问题实际上与他们的相同。 – 2013-05-02 14:43:14