Here's soemthing I wrote a while back to do the exact same thing.
It creates a query object in the request scope called, request.filelist.
This version looks for specific file types, but that is easily removed.
In you base page, call the tag....
<cf_dir basedir = "d:\sites\test\" filter=".log">
----------------------
<!---
dir.cfm
Rercursivley calls itself all thew way down a directory tree
--->
<cfparam name="request.filelist"
default="#QueryNew('Filename,FileDate,Size')#">
<cfdirectory action="LIST" directory="#attributes.basedir#" name="list">
<cfloop query="list">
<cfif type is "File" and right("#name#",4) is "#attributes.filter#">
<cfscript>
QueryAddRow(request.filelist);
QuerySetCell(request.filelist,"FileName","#attributes.basedir##name#");
QuerySetCell(request.filelist,"FileDate","#DateLastModified#");
QuerySetCell(request.filelist,"Size","#Size#");
</cfscript>
<cfelse>
<cfif NOT (name is "." or name is "..")>
<cf_dir basedir = "#attributes.basedir##name#\"
filter="#attributes.filter#">
</cfif>
</cfif>
</cfloop>
-------------------
HTH, craig.
-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2001 18:44
To: CF-Community
Subject: CF TAG
Does anyone have a CFTAG that will parse through a directory
to include subs and return the full directory / path / filenames.
I know CFDirectory does return this in a Query however this will
return a listing of the GIVEN directory and not to include the SUBS.
I basically need a tag that will do this:
Root Folder: C:\FILES
Would return in some fashion (not neccessary file the ROOT)
C:\FILES\CF\TAG2.CFM
C:\FILES\CF\TAG1.CFM
C:\FILES\JAVASCRIPT\TAG1.JS
C:\FILES\JAVASCRIPT\TAG1.JS
C:\FILES\JAVASCRIPT\USERS\1.JS
C:\FILES\JAVASCRIPT\USERS\2.JS
C:\FILES\USERS\MINE.TXT
Anyone know of a utility to do this which I have to use on a CF 4.5
server??
I know there are UDFs in CFLIB.ORG but not quite what I need.
Randy Adkins
Tech Lead - Novient
SRA International
[EMAIL PROTECTED]
(703) 803-1677
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists