Unfortunately, you can only apply one filter at a time, but here's a sample syntax for
looking for JPG's:
<CFDIRECTORY ACTION="list"
DIRECTORY="c:\inetpub\wwwroot\whatever"
NAME="mydirectory"
FILTER="*.jpg"
SORT="name DESC">
You could loop the script for each type of file you're trying to list like this:
<cfset file_types = "*.jpg,*.gif">
<cfloop list="#file_type#" index="ii">
<CFDIRECTORY ACTION="list"
DIRECTORY="c:\inetpub\wwwroot\whatever"
NAME="mydirectory"
FILTER="*.jpg"
SORT="name DESC">
<cfoutput query="mydirectory">
<cfif (name neq ".") and (name neq "..") and (name neq "index.cfm") and (size neq 0)>
#Name# #Round(DecimalFormat(size/1000))#k
</tr>
</cfif>
</cfoutput>
</cfloop>
---mark
========================================================
Mark Warrick ([EMAIL PROTECTED])
Founder, Fusioneers.com / CTO, ZapConnect.com
Phone: 714-547-5386 / 714-667-0203 / Efax: 801-730-7289
http://www.warrick.net / http://www.fusioneers.com
http://www.zapconnect.com
ICQ: 125160 AIM: markwarric Yahoo: Serengeti
========================================================
> -----Original Message-----
> From: Ewok [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 12:41 PM
> To: CF-Talk
> Subject: How can i filter more than one file type in cfdirectory
>
>
> i need to filter for jpg's AND gif's in <cfdirectory filter
> anyone know how i can do this??
>
>
>
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.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