
QUESTION: How to set the time and date for a file's creation or modification
Quote:
> How can the time and date information that is displayed in the
> "Modified" column of the Windows explorer for each file be set to a
> desired value? For example, I want my .exe to have a time and date
> stamp of 8/12/1999, 12:00 AM rather than 4:43 PM which is when the
> file was _really_ created/modified.
BOOL SetFileTime(
HANDLE hFile, // handle to the file
CONST FILETIME *lpCreationTime, // time the file was created
CONST FILETIME *lpLastAccessTime, // time the file was last accessed
CONST FILETIME *lpLastWriteTime // time the file was last written
);
typedef struct _FILETIME { // ft
DWORD dwLowDateTime;
DWORD dwHighDateTime;
Quote:
} FILETIME;
BOOL SystemTimeToFileTime(
CONST SYSTEMTIME *lpSystemTime, // address of system time to convert
LPFILETIME lpFileTime // address of buffer for converted file time
);
typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
Quote:
} SYSTEMTIME;
> e-mail responses would be appreciated.
You post it here, you read it here.