Try this: The only problem is that the file must complete the upload process, which could be a pain...
<cffile action="UPLOAD" filefield="file" destination="tempdir" nameconflict="MAKEUNIQUE"> <cfif file.clientfileext eq "gif"> <cffile action="MOVE" source="#File.ServerDirectory#\#File.ServerFile#" destination="directory\#file.clientfile#"> <cfelse> <cffile action="DELETE" file="#File.ServerDirectory#\#File.ServerFile#"> </cfif> - j ......... jim.curran technical.director nylon.technology six.west.fourteenth.street new.york.ny.10011 212.691.1134 [EMAIL PROTECTED] ...................... -----Original Message----- From: Dave Carabetta [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 3:13 PM To: CF-Talk Subject: Advanced CFCATCH Exception Types I would like to trap a CFFILE error using CFTRY/CFCATCH if the user submits a bad file type. I only want to allow them to upload .gif files. I can use the CFCATCH TYPE="Any" to trap it, but I was hoping that I could trap specifically for a bad file type. I noticed that there are a whole slew of "advanced" exception types starting with COM.* listed in the documentation, but I can't find one for a bad file type. Can one of those advanced types or a regular type be used other than "Any"? Thanks, Dave. _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists