Help Center

AfxGetFileLastWriteTimefunction

Returns the time the file was last written to, truncated, or overwritten, in FILETIME format.

WindowsfunctionAfxWin.incdocumented

Syntax

FUNCTION AfxGetFileLastWriteTime (BYREF wszFileSpec AS WSTRING, BYVAL bUTC AS BOOLEAN = TRUE) AS FILETIME

Parameters

NameDescription
wszFileSpecThe directory or path, and the file name, which can include wildcard characters, for example, an asterisk (\*) or a question mark (?). This parameter should not be NULL, an invalid string (for example, an empty string or a string that is missing the terminating null character), or end in a trailing backslash (\\). If the string ends with a wildcard, period (.), or directory name, the user must have access permissions to the root and all subdirectories on the path. To extend the limit from MAX_PATH to 32,767 wide characters, prepend "\\\\?\\" to the path.
bUTCOptional. Pass FALSE if you want to get the time in local time (the NTFS file system stores time values in UTC format, so they are not affected by changes in time zone or daylight saving time). FileTimeToLocalFileTime uses the current settings for the time zone and daylight saving time. Therefore, if it is daylight saving time, it takes daylight saving time into account, even if the file time you are converting is in standard time.

Description

Returns the time the file was last written to, truncated, or overwritten, in FILETIME format.

Reference

  • Include file AfxWin.inc
  • Defined in AfxNova/AfxWin.inc:4379
  • Documented in Windows/Windows Procedures.md
  • Topic: Windows Procedures