<!--- Attachments are stored in "Attach" subfolder --->
<CFSET AttachDir = ExpandPath("Attach")>

<!--- Get a list of all files in the directory --->
<CFDIRECTORY
  DIRECTORY="#AttachDir#"
  NAME="GetFiles">

<!--- For each file in the directory --->  
<CFLOOP QUERY="GetFiles">
  <!--- If it's a file (rather than a directory) --->
  <CFIF GetFiles.Type NEQ "Dir">
    <!--- If it's older than one hour --->
    <CFIF DateDiff("h", DateLastModified, Now()) GT 1>
      <!--- Get full filename of this file --->
      <CFSET ThisFile = ExpandPath("Attach\#GetFiles.Name#")>
    
      <!--- Go ahead and delete the file --->
      <CFFILE
        ACTION="DELETE"
        FILE="#ThisFile#">
    </CFIF>
  </CFIF>
</CFLOOP>