Some extensions are more than 3 character e.g. .html so I'd suggest
listLast(GetFileFromPath(Key), ".") 
That wouldn't work for blank extensions e.g. .[nothing] but that may not
matter.

Matthew Walker
http://www.matthewwalker.net.nz/



> -----Original Message-----
> From: Parker, Kevin [mailto:KParker@;workcover.com]
> Sent: Wednesday, 23 October 2002 5:05 p.m.
> To: CF-Talk
> Subject: File extensions
> 
> 
> I'm just doing some string manipulation to get the file 
> extension for search
> engine results. Is string manipulation the best way or is 
> there another way
> in CF I can extract that.
> 
> Here's what I'm currently doing... 
> 
> <CFIF RTrim(Right(GetFileFromPath(Key), 3)) IS "txt">
> 
> I had thought of MIME type but as the results are coming from 
> Verity I can
> only get that if I modify the style.sfl file and as we are on a hosted
> server that's a problem.
> 
> TIA!
> 
> 
> **********
> 
> Kevin Parker
> Web Services Manager
> WorkCover Corporation
> 
> [EMAIL PROTECTED]
> www.workcover.com
> 
> p: 08 82332548
> f: 08 82332000
> m: 0418 806 166
> 
> **********
> 
> 
> 
> **************************************************************
> **********
> This e-mail is intended for the use of the addressee only. It may 
> contain information that is protected by legislated confidentiality
> and/or is legally privileged. If you are not the intended 
> recipient you
> are prohibited from disseminating, distributing or copying 
> this e-mail.
> 
> Any opinion expressed in this e-mail may not necessarily be 
> that of the
> WorkCover Corporation of South Australia. Although precautions have
> been taken, the sender cannot warrant that this e-mail or any files
> transmitted with it are free of viruses or any other defect.
> 
> If you have received this e-mail in error, please notify the sender
> immediately by return e-mail and destroy the original e-mail and any
> copies.
> **************************************************************
> **********
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to