Wow, after almost 5 years of developing reports, web systems, document imaging, etc, I am over 650,000 lines of code on my production box.
Granted, some was done many years ago and I'm not TOO proud of... but it still counts =) Chris -----Original Message----- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 7:27 AM To: CF-Talk Subject: Re: Lines of code counter >>Here is one that I used before just to check it out. Right now my app has 12,849 lines Mine is 15,976. I slightly modified your code which had a couple of problems: 1. it was reading all files, including images, 2. it bugs on files with no extension. 3. added extension TXT since I have multilingual strings in txt files. <cfdirectory directory="C:\inetsrv\wwwroot\FAFO" action="list" name="mySite" filter="*" sort="directory" recurse="yes"> <cfset totalLines = 0> <!---loop over all the files and filter on list of extensions---> <cfloop query="mySite"> <cfif type eq "file"> <cfif listLen(name, '.') GT 1 AND "cfc,cfm,xml,as,sql,css,html,txt" CONTAINS listGetAt(name, 2, '.')> <!---create an array of line items (parse by ascii carriage return and output the name of the file---> <cffile action="read" file="#directory#\#name#" variable="curFile" > <cfset myArray = listToArray(curFile, "#Chr(13)#")> <cfoutput>#name#<br /></cfoutput> <!---add current files line count to total---> <cfset totalLines = totalLines + arrayLen(myArray)> </cfif> </cfif> </cfloop> <!---output line count total---> <cfoutput>#totalLines#</cfoutput> -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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/groups/CF-Talk/message.cfm/messageid:252960 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4