Use the following code.
Code: CPP
CFileStatus fs;
if (CFile::GetStatus(szFile, fs))
{
    fs.m_mtime = m_FileTime;
    CFile::SetStatus(szFile, fs);
}
Or you can try File Handling Routines