> 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?

You could try either 
ListFirst(File.ServerFile,".")
or
Left(File.ServerFile,Len(File.ServerFile)-4)

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this email in error please notify 
the system manager.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to