i was actually going to suggest this. the only problem is if the file name
is something like filename.old.cfm or something like that.
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-----Original Message-----
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 3:42 PM
To: CF-Talk
Subject: RE: trim a string variable
Look at the List functions within ColdFusion - they are extremely useful.
In your example, you could say
<cfset newfilename = ListFirst(File.ServerFile,".")>
Note that you don't need the # signs inside the <CFSET> tag.
Bob
-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]]
Sent: February 7, 2001 1:56 PM
To: CF-Talk
Subject: trim a string variable
Is there a way to trim a string like : file.jpg
to : file
(aka knock off the last 4 characters)
<cfset newfilename = #left(File.ServerFile,4)#> Does not work because the
name of the file in the database could be longer then 4 characters
Is there a function that im missing to trim off the last 4 characters of a
variable?
Thanks
Chad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists