cfduirectory will create a query recordset. That should be all you need.
Try:

<cfdirectory
        directory="#getdirectoryfrompath(getcurrenttemplatepath())#"
        action="list"
        name="files"
        filter="*.html"
        sort="name"
>
<cfdump var="#files#">

> -----Original Message-----
> From: Jason Miller [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 23 November 2002 5:18 p.m.
> To: CF-Talk
> Subject: Compiling List of Files in specific folders
> 
> 
> Sorry for posting this - it does seem like it should be a 
> simple/novice 
> thing to find a sample and do but I have been unable to get it.
> I simply need to have cf sniff out all .html maybe all html 
> that start 
> with a certain prefix - and compile a list of the files 
> available in a 
> directory.
> 
> I tried using strict naming on files and set a cfif 
> fileexsits in a loop 
> - but it was ugly - real ugly. Can anyone simply throw out a 
> hint as to 
> which direction and code I really should use.
> 
> Needs to be simple, quick and lightweight - It is for a VERY 
> VERY small 
> site I simply do not want to have to keep adding links to as 
> files are 
> created. No database involved. It's also hosted so custom tags are 
> really a long shot.
> Thanks a bunch in advance.
> Jay Miller
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

Reply via email to