# FileGetTime

Retrieves the datetime stamp of a file or folder.

FileGetTime, OutputVar [, Filename, WhichTime]

#### Parameters

OutputVar | The name of the variable in which to store the retrieved date-time in format YYYYMMDDHH24MISS. The time is your own local time, not UTC/GMT.
Filename | The name of the target file or folder, which is assumed to be in %A_WorkingDir% if an absolute path isn't specified. If omitted, the current file of the innermost enclosing File-Loop will be used instead.
WhichTime | Which timestamp to retrieve: M = Modification time (this is the default if the parameter is omitted) C = Creation time A = Last access time

#### ErrorLevel

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

#### Remarks

A file's last access time might not be as precise on Win9x as it is on NT based operating systems.

See YYYYMMDDHH24MISS for an explanation of dates and times.

#### Related

FileSetTime, FormatTime, If var is [not] type, FileGetAttrib, FileSetAttrib, FileGetSize, FileGetVersion, File-loop, EnvAdd, EnvSub

#### Example

    FileGetTime, OutputVar, C:\My Documents\test.doc  ; Retrieves the modification time by default.
    FileGetTime, OutputVar, C:\My Documents\test.doc, C  ; Retrieves the creation time.