I have to say that's a great little tag you wrote. Here are two very simple
examples of how you can use it:
<!--- find all the stored procedure calls in my application --->
<cf_dp_filefind directory="c:\af\" recurse="Y" extensionstofind="cfm"
outputstyle="query" outputquery="files">
<cfset fileList="">
<cfloop query="files">
<cffile action="read" file="#file#" variable="thisFile">
<cfif findNoCase("cfstoredproc", thisFile)>
<cfset fileList = listAppend(fileList, file)>
</cfif>
</cfloop>
<cfoutput>
Total = #listLen(fileList)#<br />
<cfloop list="#fileList#" index="i">
#i#<br />
</cfloop>
</cfoutput>
<!--- Give me total rows and total files, with file filtering --->
<cf_dp_filefind directory="c:\af\" recurse="Y"
extensionstofind="cfm,css,js,txt,sql" outputstyle="query"
outputquery="files">
<cfset totalLines = 0>
<cfloop query="files">
<cffile action="read" file="#files.file#" variable="thisFile">
<cfset totalLines = totalLines + listLen(thisFile, chr(10)&chr(13))>
</cfloop>
<cfoutput>
Total rows = #totalLines#
<br />
Total Files = #files.recordCount#
</cfoutput>
> -----Original Message-----
> From: Jim Davis [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 17, 2006 1:05 PM
> To: CF-Community
> Subject: RE: Unique file extensions question
>
> > -----Original Message-----
> > From: Brian Simmons [mailto:[EMAIL PROTECTED]
> > Sent: Monday, July 17, 2006 12:35 PM
> > To: CF-Community
> > Subject: Unique file extensions question
> >
> > Anybody got a suggestion for this situation:
> >
> > I've got a folder that contains many other folders, and many files.
> > I would like to get a breakdown of the file extensions in the folder,
> i.e.
> > 5000 .MP3 files
> > 1000 .XLS files
> > 500 .GIF files
> > etc...
>
> Boy... making me dig through the vaults! ;^)
>
> This is a custom tag I wrote for CF 4.5 that will do what you're asking:
>
> http://www.depressedpress.com/Content/Development/ColdFusion/Extensions/DP
> _F
> ileFind/Index.cfm
>
> This will recurse over a given directory and return a query of all the
> files
> found (optionally returning only files of a specific extension list). You
> can then easily do a Query-of-Query to get the actual numbers or total
> sizes
> or whatever.
>
> Jim Davis
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:5/messageid:211300
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5