Jerry... You hit upon something I thought about after I posted my solution. Yes, there definitely could be more than one period, since these are user-uploaded images.
I'll modify my code to use: #listdeleteat(file,listlast(file.'.'),'.')> Now, I'm assuming that the code above will work if there's only one period, too, right? (I'll test it shortly after lunch!) And while I'm at it, I should probably just strip out any periods which might exist in the name beyond two. I thought about asking the user to do it with an error message, but the less I ask these users to do, the better! ;o) Rick PS - I just can't get over how great it is to have some image functions! > -----Original Message----- > From: Jerry Johnson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 12:04 PM > To: CF-Talk > Subject: Re: How do I get the characters after the last period in a string? > > Use the list functions, with the period as the delimiter > > could there be more than one period? If so, you need to decide between > two options (if not, then either will work) > > If you only want to remove the very last extension after the last period, > > <cfset name=listDeleteAt(file,listLast(file,"."),".")> > > If you only want the content before the first one, > > <cfset name=listFirst(file,".")> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292853 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

