FileSetLastModified

Description

Sets the date when an on-disk or in-memory file was most recently modified.

Function syntax

FileSetLastModified(filepath, date)

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

filepath

An absolute path to an on-disk or in-memory 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>