Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Written by Segi Hovav 04/18/16
- REM
- REM Count the total number of lines in all eBase scripts
- setlocal EnableDelayedExpansion
- set basePath=C:\ebaseXi5\Workspace\
- set showDetails=0
- REM Change to Ebase Workspace
- cd /d %basePath%
- REM Generate the list of all scripts in the current workspace
- dir /b /s | find "Scripts\" > scriptlist.txt
- Set /a _Lines=0
- REM Loop through each line in scriptlist.txt
- for /F "tokens=*" %%A in (scriptlist.txt) do (
- REM count the # of line in the current file
- For /f %%j in ('Type "%%A"^|Find "" /v /c') do (
- Set /a _Lines=!_Lines! + %%j
- REM Display the details
- If %showDetails% == 1 (
- set tmpname=%%A
- echo Processing file !tmpname:~22! which has %%j lines
- )
- )
- )
- echo The total line count is !_Lines! lines
- pause
- del scriptlist.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement