You can treat it like a list. If "f" is a file name: <cfset extension = listLast(f, ".")>
Of course, this assumes a file has an extension, "foo" is a valid filename. If you use the code above, it will return foo, so you probably want to combine it with: <cfif listLen(f, ".") gte 2> <cfset extension = listLast(f, ".")> <cfelse> <cfset extension = ""> </cfif> On 8/27/07, Robert Harrison <[EMAIL PROTECTED]> wrote: > Using CF, how do I get just the file extension from a file name? > > > > Thanks > > > > > > > > Robert B. Harrison > Director of Interactive services > Austin & Williams > 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 > T : 631.231.6600 Ext. 119 > > F : 631.434.7022 > www.austin-williams.com > > Great advertising can't be either/or... It must be &. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287194 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

