errata: The last line of the message below should be "isn't cutting off..."
Duh... Rick > -----Original Message----- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Thursday, January 01, 2009 9:16 PM > To: cf-talk > Subject: Why won't this code work? > > Happy New Year, everyone... > > I'm running this code: > > <cffile action="delete" > file="e:\inetpub\webroot\fortstewart\user_images\#replace(fieldname, > 'delete_image_', '')#"> > > and getting this error: > > File e:\inetpub\webroot\fortstewart\user_images\DELETE_IMAGE_0412_002_W200.JPG > specified in action delete does not exist. > > To Explain: > > The file to be deleted is "0412_002_W200.JPG" > > The formfield that is checked (checkbox) to mark the file above for deletion > is named (dynamically): > DELETE_IMAGE_0412_002_W200.JPG > > But the code, #replace(fieldname, 'delete_image_', '')#, is cutting off the > "DELETE_IMAGE_" part, > so it's trying to delete an non-existent file. > > Why? > > Thanks, > > Rick > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317326 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4