>I use CFDIRECTORY all the time to scan the image library for various
>maintenance purposes. I want to read and list only image files. These may be
>.jpg, .gif, or .png, yet CFDIRECTORY can only filter on one file type.
>
>Does anyone know of a way I can extend the file filter and get what I want
>in a single read? Right now I need to run a CFDIRECTORY for each file type I
>want and combine outputs. This seems kind of stupid.
>
>Thanks
>
>
>
>
>Robert B. Harrison
>Director of Interactive services
>Austin & Williams
>125 Kennedy Drive, Suite 100 Hauppauge NY 11788
>T : 631.231.6600 Ext. 119
>F : 631.434.7022
>www.austin-williams.com
>
Robert,
Try something along these lines:
<cfset dircur = GetDirectoryFromPath(GetTemplatePath())>
<cfdirectory
directory="#dircur#"
name="dirimg"
sort="name ASC"
filter="*.jpg|*.gif|*.png">
<cfif dirimg.recordcount eq 0>
Sorry, no images are currently available. Please try again later.
<cfelse>
<cfoutput query="dirimg">
....
Good luck,
Steve Withington
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282255
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4