Sets extended time information for one or more files.
FileTimeSetEx(file-list, datetime , time-field)
(s) file-list: filename, list of files, or list of wildcards of files reset. (example: "*.jpg|*.bmp")
(s) datetime: datetime in the YmdHms format
(i) time-field: see below.
(i) returns @TRUE on success; @FALSE if any of the specified files could not be changed.
Use this function to reset the date and time of a specific file or list of files.
This function is like FileTimeSet, but lets you specify which time field you want to set. "Time-field" can be one of the following:
1 file created
2 file last modified
3 file last accessed
Windows Vista/2008 and newer: This function may require an Administrator level account if dealing with files located in a protected directories: 'Program Files' and 'Windows'.
This function supports extended-length path names.
; Alter time of the WIN.INI file winini= FileLocate("Win.ini") b=FileYmdHms(winini) Message("File Time for %winini% is", b) a="2000:02:14:09:38:26" ; FileTimeSetEx(winini, a, 2) b=FileYmdHms(winini) Message("File Time for %winini% is now", b) ; ;Alter the time of all files in the temp directory a=TimeYmdHms( ) Temp = Environment("temp") If StrSub(temp,StrLen(temp),1)!="\" Then temp=StrCat(temp,"\") FileTimeSetEx("%temp%*.*", a, 2)
GetExactTime, FileYmdHms, TimeDiffDays, TimeDiffSecs, FileTimeSet, TimeYmdHms