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,".")>

On Nov 7, 2007 11:41 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> This seems so simple, yet I couldn't figure out the answer even after
> going through the list and strings functions in the docs for CF 8.
>
> I want to return the characters in the name of a photo preceding the
> period.
>
> i.e.. If the photo is named "dog.jpg", I want to strip out ".jpg" from the
> filename so I can alter the filename and then "reattach" the ".jpg".
>
> Seems so simple, but I can't figure out how to get it done.
>
> Rick
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:292846
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to