Adobe ColdFusion 8

FileSetLastModified

Description

Sets the date when the file was most recently modified.

Category

System functions

Function syntax

FileSetLastModified(filepath, date)

See also

FileCopy, FileDelete, FileExists, FileMove, FileSetAccessMode, FileSetAttribute

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

filepath

An absolute path to a file on the server.

date

A valid ColdFusiondate or datetime.

Example

<cfscript>
    FileSetLastModified("c:\temp\test1.txt", "#Now()#");
    WriteOutput(#GetFileInfo("c:\temp\test1.txt").lastmodified#);
</cfscript>