forked from MarkusMaal/BlueScreenSimulatorPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetLines.bat
55 lines (55 loc) · 987 Bytes
/
GetLines.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
setlocal EnableExtensions EnableDelayedExpansion
echo Analyzing your project...
dir /b *.cs>files.txt
set "files="
for /f "delims=" %%a in (files.txt) do (
set o=%%a
if "!o!"=="!o:.Designer.cs=!" (
if not "!files!"=="" (
set "files=!files!, %%a"
) else (
set "files=%%a"
)
type %%a>>yo.txt
)
)
del files.txt
set /a IDX=0
set /a IDX2=0
set /a IDX3=0
set /a IDX4=0
for /f "delims=" %%a in (yo.txt) do (
set o=%%a
set o=!o:~0,7!
set /a IDX3+=1
if "!o!"=="!o://=!" (
if "!o!"=="!o:/*=!" (
if "!o!"=="!o: *=!" (
if "!o!"=="!o:*/=!" (
set /a IDX2+=1
) else (
set /a IDX4+=1
)
) else (
set /a IDX4+=1
)
) else (
set /a IDX4+=1
)
) else (
set /a IDX4+=1
)
)
del yo.txt
cls
echo.
echo This C# project contains...
echo.
echo !IDX3! lines of user written code
echo !IDX2! non-commented lines
echo !IDX4! commented lines
echo.
echo Scanned files:
echo !files!
pause