Re: CFDIRECTORY filter shortcoming
filter=*.jpg|*.gif|*.png No way. As the docs says: One filter can be applied. Only one filter, with ? or * wild characters, A la DOS, or even A la CP/M should I say... But with CFX_ListDir, this will work using attribute EXTENSIONS = *.jpg,*.gif,*.png -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282267 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFDIRECTORY filter shortcoming
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
CFDIRECTORY filter shortcoming
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 Great advertising can't be either/or... It must be . No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.9.1/857 - Release Date: 6/20/2007 2:18 PM ~| 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:281887 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFDIRECTORY filter shortcoming
Does anyone know of a way I can extend the file filter and get what I want in a single read? Have a look at CFX_ListDir : http://www.contentbox.com/claude/customtags/ListDir/viewListDir.cfm You can provide a list of extentions, among many other parameters : CFX_ListDir DIRECTORY = full path name of the directory to list [NAME] = Name for output record set. [QUERY] = Name of an optional query to append results to. [FILTER] = File extension filter applied to returned names; [EXTENSIONS] = List of file extensions [MODIFIEDBEFORE] = limit file list to those modified before this date [MODIFIEDAFTER] = limit file list to those modified after this date [TYPE] = file or dir, to list only files or directories [READONLY] = select files according to their read-only attribute [SYSTEM] = select files according to their system attribute [HIDDEN] = select files according to their hidden attribute [ARCHIVE] = select files according to their archive attribute [RECURSE] = Whether the tag performs the action on subdirectories [SORT] = Query column(s) by which to sort directory listing -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:281888 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4