Returns the time and date information for a file.
FileGetTime ( "filename" [, option [, format]] )
Parameters
filename | Filename to check. |
option | [optional] Flag to indicate which timestamp 0 = Modified (default) 1 = Created 2 = Accessed |
format | [optional] to specify type of return 0 = return an array (default) 1 = return a string YYYYMMDDHHMMSS |
Return Value
Success: | Returns an arrayor string that contains the file time information. See Remarks. |
Failure: | Returns numeric 1 and sets @error to 1. |
Remarks
The array is a single dimension array containing six elements:
Related
FileGetSize, FileGetAttrib, FileGetVersion, FileSetTime
Example
$t = FileGetTime(@Windowsdir & "\Notepad.exe", 1)
If Not @error Then
$yyyymd = $t[0] & "/" & $t[1] & "/" & $t[2]
MsgBox(0, "Creation date of notepad.exe", $yyyymd)
EndIf