Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- rem ohne Leerzeilen
- set "lines=0"
- set "files=0"
- echo Durchsuche Ordner %cd% und Unterverzeichnisse...
- for /f "tokens=*" %%a in ('dir /b /s *.txt') do (
- set /a files+=1
- for /f %%k in ('type "%%~a" 2^>nul') do (
- set /a lines+=1)
- )
- echo %lines% Zeilen (ohne Leerzeilen) in %Files% Dateien
- rem leerzeilen mitzählen
- echo Durchsuche Ordner %cd% und Unterverzeichnisse...
- set "lines=0"
- set "files=0"
- for /f "tokens=*" %%a in ('dir /b /s *.txt') do (
- set /a files+=1
- for /f %%k in ('find /n /v "" "%%~a" 2^>nul ') do (
- set /a lines+=1)
- )
- echo %lines% Zeilen in %Files% Dateien
- pause
- exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement