To troubleshoot, one, the pounds are not needed so I'd take those out. Two, in cfelse, what is the value of:
<cfoutput>#variables.ImageSource#<cfoutput> do something else In other words, what is the variable's value as soon as you hit cfelse. - Gabriel On Thu, Apr 8, 2010 at 1:03 PM, Fred Grainger <i...@fredgrainger.com> wrote: > > Ok - I'm about to pull my hair out. > > I am using fileexists() function to determine whether a image file exists on > the server. When I type in the path it works fine, but when I use a variable > it always returns false. > > My code is like this: > > <cfset variables.ImageSource = "C:\somedirectoy\somefile.txt"> > > <cfif FileExists(#variables.ImageSource#)> > do something > <cfelse> > do something else > </cfif> > > The variable works everywhere else in the code. I am outputting it to the > browser and have double triple checked to make sure the variable value is > correct. > > I've been working on this a day and a half and cannot get it to work. > > HELP! > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332773 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm