Function Reference

FileSetTime

Sets the timestamp of one of more files.

FileSetTime ( "file pattern", "time", type [, recurse] )

 

Parameters

file pattern File(s) to change, e.g. C:\*.au3, C:\Dir
time The new time to set in the format "YYYYMMDDHHMMSS" (Year, month, day, hours (24hr clock), seconds). If the time is blank "" then the current time is used.
type The timestamp to change: 0 = Modified, 1 = Created, 2 = Accessed
recurse [optional] If this is set to 1, then directories are recursed into. Default is 0 (no recursion).

 

Return Value

Success: Returns 1.
Failure: Returns 0 if error changing timestamp(s).

 

Remarks

Under Windows 9x you cannot change the timestamp of a directory; attempts to do so are ignored.

 

Related

FileGetTime, FileGetAttrib, FileSetAttrib

 

Example


;change file.au3's "modified" timestamp to 1st Nov 2003 and current time
$var = FileSetTime("file.au3", "20031101")