Well, you live in a perfect world if your encouragement works! I need to
know your secret!

In the event that it doesn�t work� cover it anyway�

<cfset FileName = "some.dumb.file.exe">

<cfset FileName = replace(replace(FileName, ".#ListLast(FileName, '.')#",
""), ".", "_", "ALL") & "." & ListLast(FileName, ".")>

<cfoutput>#FileName#</cfoutput>

This will turn some.dumb.file.exe into some_dumb_file.exe

   _____  

From: Mark Henderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 7:13 PM
To: CF-Talk
Subject: RE: Removing extensions from filelists

Thanks to both Pascal and Ewok (and pardon the delay in responding. I've
been out of the office). I also I must've missed your response detailing
regexp  as a solution Pascal, but I'm looking it up now. Til then I'm using
Ewoks solution since it seems to be working fine (no dots in filenames). I
encourage most of our users to go with underscores as opposed to dots or
spaces when naming their files.

Regards

Mark Henderson
Web Designer
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

205 Main Street
PO Box 143, Gore
Southland 9700
Phone: (03) 203 9999
Fax: (03) 203 9900

-----Original Message-----
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 1:19 AM
To: CF-Talk
Subject: RE: Removing extensions from filelists

This will work in most cases, but not if there is a dot in the filename.
The easiest way to remove the extension is using the regexp I posted.
List functions will give problems in some cases.

Pascal

> -----Original Message-----
> From: Ewok [mailto:[EMAIL PROTECTED]
> Sent: 30 August 2004 13:15
> To: CF-Talk
> Subject: RE: Removing extensions from filelists
>
> <cfdirectory name="fls" directory="d:\my\dir\of\files" action=""> >
>
>
> <cfoutput query="fls">
>
> #replace(listFirst(name, "."), "_", " ", "ALL")#<br>
>
> </cfoutput>
>
>

   _____  

[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=t:4"Todays Threads]
[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=i:4:176663"This
Message] [HYPERLINK
"http://www.houseoffusion.com/lists.cfm/link=s:4"Subscription] [HYPERLINK
"http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=678.598.4"Fast
Unsubscribe] [HYPERLINK "http://www.houseoffusion.com/signin/"User Settings]
[HYPERLINK
"https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&bus
iness=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick"Donation
s and Support]

   _____  

HYPERLINK "http://www.houseoffusion.com/banners/view.cfm?bannerid=35" \n

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to