FileGetTime

Retrieves the datetime stamp of a file or folder.

FileGetTime, OutputVar , Filename, WhichTime

Parameters

OutputVar

The name of the output variable in which to store the retrieved date-time in format YYYYMMDDHH24MISS. The time is your own local time, not UTC/GMT.

Filename

If blank or omitted, the current file of the innermost enclosing file loop will be used. Otherwise, specify the name of the target file or folder, which is assumed to be in %A_WorkingDir% if an absolute path isn't specified.

WhichTime

If blank or omitted, it defaults to M. Otherwise, specify one of the following letters to set which timestamp should be retrieved:

Error Handling

[v1.1.04+]: This command is able to throw an exception on failure. For more information, see Runtime Errors.

ErrorLevel is set to 1 if there was a problem or 0 otherwise.

A_LastError is set to the result of the operating system's GetLastError() function.

Remarks

See YYYYMMDDHH24MISS for an explanation of dates and times.

FileSetTime, FormatTime, If Var is [not] Type, FileGetAttrib, FileSetAttrib, FileGetSize, FileGetVersion, file loop, EnvAdd (date math), EnvSub (date difference)

Examples

Retrieves the modification time and stores it in OutputVar.

FileGetTime, OutputVar, C:\My Documents\test.doc

Retrieves the creation time and stores it in OutputVar.

FileGetTime, OutputVar, C:\My Documents\test.doc, C