You do know you can do a query of queries on this, right? right.
At 09:28 AM 6/21/2002 +0100, you wrote:
>What about doing one cfdirectory call, and something like:
>
><cfoutput query="dir">
> <cfif Right(name,3) eq "jpg" OR Right(name,3) eq "gif">
> #name#
> </cfif>
></cfoutput>
>
>Ian
>
>-----Original Message-----
>From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
>Sent: 20 June 2002 23:32
>To: CF-Talk
>Subject: Re: 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??
>
>afaik there's not any way to do it naturally, i.e. with a single cfdirectory
>call... if you need the list of them in alpha order, odds are you'll have to
>do some tinkering... Something like this may work in CF 5:
>
><cfdirectory action="list" name="rsimg"
> sort="name" directory="#expandpath('images')#">
>
><cfset imgarray = ArrayNew(1)>
>
><cfloop query="rsimg">
> <cfif rsimg.type is "file" and
> ListFindNoCase("gif,jpg,jpeg",listlast(rsimg.name,"."))>
> <cfset temp = ArrayAppend(imgarray,1)><cfelse>
> <cfset temp = ArrayAppend(extarray,0)></cfif>
></cfloop>
>
><cfset temp = QueryAddColumn(rsimg,"isimg","imgarray")>
><cfquery name="rsimage" dbtype="query">
> SELECT * FROM rsimg WHERE isimg = 1
></cfquery>
>
>And at this point the query "rsimage" will hold the info you want.
>
>hope this helps,
>
>Isaac
>
>www.turnkey.to
>954-776-0046
>
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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