Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Chat-Auto
- setlocal enabledelayedexpansion
- for /f "tokens=*" %%a in ('find /v /c "" ^< "console.log"') do set /a nb=%%a
- set /a delMsg=!nb!-31
- set /a nbLine=0
- if exist "consoleLimit.log" del /q "consoleLimit.log"
- for /f "tokens=*" %%b in ('type "console.log"') do set /a nbLine+=1 & if !nbLine! GTR !delMsg! echo;%%b >> "consoleLimit.log"
- :loop
- if exist ok del /q ok&call :Limit 40
- goto :loop
- :Limit
- set /a ListMsg=%~1-2
- mode con lines=%~1 cols=150
- for /f "tokens=*" %%a in ('find /v /c "" ^< "consoleLimit.log"') do set /a nb=%%a
- set /a delMsg=!nb!-31
- set /a nbLine=0
- for /f "tokens=*" %%b in ('type "consoleLimit.log"') do (
- if "!nbLine!"=="0" del /q "consoleLimit.log"
- set /a nbLine+=1 & if !nbLine! GTR !delMsg! echo;%%b >> "consoleLimit.log"
- )
- type consoleLimit.log
- goto :eof
- pause>nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement