I would like to check if a folder is greater that 30 days old and have the following code
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
}
I want to compare the variables above to see if ftCreatedDate is greater than 30 days old