Use the function FileExists(ExpandPath("images/" & sku & ".gif"))

-----Original Message-----
From: Larry Juncker [mailto:[EMAIL PROTECTED]] 
Sent: maandag 9 september 2002 15:10
To: CF-Talk
Subject: CFDirectory Question


I have a shopping cart that I have created and the images can be either
gif or jpg.

Since I am dynamically pulling from the images folder, how can I check
to see which image exists for a particular item.

I am currently doing this:

<img src="images/#sku#.gif">

I need to be able to see if #sku#.gif exists or #sku#.jpg and then
display the proper image.

Any help would be greatly appreciated.


______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to