RE: trim a string variable

2001-02-08 Thread Braver, Ben:
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

RE: trim a string variable

2001-02-08 Thread Philip Arnold - ASP
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

RE: trim a string variable

2001-02-08 Thread Jay Jennings
The easiest way is probably by using the ListFirst function like this: newName = ListFirst(oldName, ".") jay -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 10:56 AM To: CF-Talk Subject: trim a string variable Is t

RE: trim a string variable

2001-02-08 Thread Lord, Heath
AIL PROTECTED]] Sent: Wednesday, February 07, 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 i

RE: trim a string variable

2001-02-08 Thread Phoeun Pha
: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 12: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

RE: trim a string variable

2001-02-08 Thread Caulfield, Michael
left(File.ServerFile,len(File.ServerFile)-4) -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 12: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

RE: trim a string variable

2001-02-08 Thread Bob Silverberg
TED]] 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 lon

RE: trim a string variable

2001-02-08 Thread Terry Bader
: 5202487 aim: lv2bounce http://www.cs.odu.edu/~bader -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 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

Re: trim a string variable

2001-02-08 Thread Gary Dusbabek
be to parse for the last period and return everything before that. Return everything if there is no period. - Original Message - From: "Chad Gray" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, February 07, 2001 11:55 AM Subject: trim a string variab

RE: trim a string variable

2001-02-08 Thread Terry Bader
correction, line 3: CFSET newfilename = server.serverfilename should read CFSET newfilename = file.serverfilename sry... Terry Bader IT/Web Specialist EDO Corp - Combat Systems (757) 424-1004 ext 361 - Work [EMAIL PROTECTED] (757)581-5981

RE: trim a string variable

2001-02-08 Thread Chris Montgomery
uary 07, 2001 12: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 long

Re: trim a string variable

2001-02-08 Thread Robert Kuhn
of Counted Sorrows - Original Message - From: "Chad Gray" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, February 07, 2001 1:55 PM Subject: trim a string variable Is there a way to trim a string like : file.jpg to : file (aka knock off t

RE: trim a string variable

2001-02-08 Thread Craig Dudley
Try cfset filename = "file.jpg" cfset newfilename = spanexcluding(filename,".") -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: 07 February 2001 20:26 To: CF-Talk Subject: RE: trim a string variable Left(var,Len(var)-4) Let's say var =

RE: trim a string variable

2001-02-08 Thread Jeff Beer
: Wednesday, February 07, 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

RE: trim a string variable

2001-02-08 Thread Nick McClure
, 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 t

RE: trim a string variable

2001-02-08 Thread Christopher Olive, CIO
]] 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 # si

RE: trim a string variable

2001-02-08 Thread Jay Jennings
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. So then you can do this: cfset newname = Reverse(ListRest(Reverse(filename), ".")) That will handle almost anything. As long as you know you want to

trim a string variable

2001-02-07 Thread Chad Gray
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

RE: trim a string variable

2001-02-07 Thread Allan Pichler
You can do it this way CFSET newfilename=left(File.ServerFile,(len(File.ServerFile)-4)) Allan Pichler -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 10:56 AM To: CF-Talk Subject: trim a string variable Is there a way to trim a string

RE: trim a string variable

2001-02-07 Thread Sicular, Alexander
ED]] Sent: Wednesday, February 07, 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 co