I recently had to estimate how many files were contained in a large solution. Even harder, I was asked for how many lines of code the application contained. Windows powershell to the rescue!
Windows PowerShell Get File Count:
(Get-ChildItem "C:\[Code Location]" -force -recurse).Count
To get a line count first navigate to the directory in question via: cd [dir]
Windows PowerShell Get Line Count:
(dir -include *.vb, *.cs, *.xsd, *.mdf, *.xml, *.xslt, *.cd, *.js, *.vbs, *.wsf, *.config, *.resx, *.ico, *.rpt, *.txt, *.apsx, *.asax, *.ashx, *.htm, *.html, *.css, *.sitemap, *.skin, *.browser, *.disco, *.ascx -recurse | select-string .).Count
Windows PowerShell is a powerful tool in any programmer's arsenal. The next time you have a task to perform and are looking for a tool to do it with give the task name combined with Windows PowerShell a try in google.
Here are some great Windows PowerShell resources:
Scripting with Windows PowerShell
Automating IT Tasks with Windows PowerShell Overview
Windows PowerShell SDK
PowerShell Scripts, Tips, Expert Advice & Training, Forums, and Resources