You can set the ACCEPT parameter to the mime type of the type of file you want, like<br><FONT FACE=monospace><b><br><CFFILE ACTION="Upload" FILEFIELD="TheFile" DESTINATION="c:\web\uploads\" ACCEPT="text/html" NAMECONFLICT="MakeUnique"><br></b></font><br>If you do not want to use the ACCEPT parameter (you just want to check an extension, you could do something like:<br><FONT FACE=monospace><b><br><CFFILE ACTION="Upload" FILEFIELD="TheFile" DESTINATION="c:\web\uploads\" NAMECONFLICT="MakeUnique"><br><br><cfif file.ClientFileExt is "htm" or file.ClientFileExt is "html"><br><br> <cfset filename=file.ServerFile><br> <cfset directoryname=file.ServerDirectory><br><br> <cfif file.FileWasRenamed><br> <cfset cfilename=file.ClientFileName><br> <cfset cfileext=file.ClientFileExt><br> <cffile action="rename" source="#directoryname#\#filename#" destination="#directoryname#\#cfilename#1.#cfileext#"><br> </cfif><br><br><cfelse><br><br> <cffile action="delete" file="#directoryname#\#filename#"><br><br></cfif><br></b></font><br>There is one problem with this code in that if you upload a file called file.htm and it already exists, it will be renamed file1.htm whether or not file1.htm already exists. You should probably do a more thorough check for this condition....<br><br>Also, I can't remember off the top of my head whether file.serverdirectory returns the path with a trailing backslash or not. If it does, you should take the backslashes out...<br><br>Hope this helps.