FileTimeSet

Sets the date and time of one or more files.

Syntax:

FileTimeSet(file-list, datetime)

Parameters:

(s) file-list: filename, list of files, or list of wildcards of files reset. (example: "*.jpg|*.bmp")

(s) datetime datetime in the YmdHms format

Returns:

(i)  @TRUE All files specified were time stamped; @FALSE One or more files were not time stamped.

 

Use this function to reset the date and time of a specific file or list of files.

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.

Example:


; 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"
;
FileTimeSet(winini, a)
b=FileYmdHms(winini)
Message("File Time for %winini% is now", b)
See Also:

GetExactTime, FileTimeSetEx, FileYmdHms, TimeDiffDays, TimeDiffSecs, TimeYmdHms