Plucka's solution is what you want. Here's how to go about it:
<cfdirectory action="LIST" directory="c:\yourImageFol
<cfoutput query="MyFiles">
<cfif MyFiles.Type is "File">
<cfif ListLast(MyFiles.name, ".") is "jpg">
Do something
<cfelse ListLast(MyFiles.name, ".") is "tiff">
Do something else
</cfif>
</cfif>
</cfoutput>
Main Topics
Browse All Topics





by: PluckaPosted on 2006-03-21 at 18:33:14ID: 16253756
stacey14,
Use <CFDIRECTORY to list the contents of a directory.
Then once you have the filenames, use ListLast(name, ".") to get the extension.
Regards
Plucka