If you want to know the KLOC for every files in your project then Microsoft line of code counter tool can help you.
This tool is freeware and it’s very useful in knowing the exact line number of code in particular files.It excludes the comments and blank space in LOC.
You can use Team Foundation Server, Visual Source Safe or File System for input of the file or folder.This tool also gives the report and we can export to excel also!!
You can download the tool from below given link.
Software Name - Microsoft Line of Code (LOC) Counter
Type – Freeware
Size- 10.7 MB