> You do know you can do a query of queries on this, right?
> right.

That's what my example showed -- however -- query of query is
case-sensitive, and doesn't allow you to use functions on columns or the
LIKE keyword ( last I checked in CF 5 -- maybe dif. in CF MX ) ... so you'd
have to determine which files are the ones you want manually -- create an
array, apply the array as a new column, then use a query of query to
eliminate the items you don't want.


Isaac

www.turnkey.to
954-776-0046

> 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(rs
>>                 img.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


______________________________________________________________________
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

Reply via email to