Nagual
Full Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Код: @echo off setlocal enabledelayedexpansion copy nul send_mobile.txt for %%a in (DisplayName) do for /f "tokens=1,2 delims==" %%b in ('more user.ini^|findstr/b %%a') do set c=%%c set c=%c:~5% :: max users="%c%" for /f "tokens=1,2 delims==" %%a in (user.ini) do (set q=!q! %%b) set q=%q:~1% echo main array="%q%" echo. for /l %%a in (1,1,%c%) do ( call:q ) goto:eof :q set /a c1+=1 set /a c2=%c1%*5-4 set /a c3=%c1%*5 echo array for tokens "%c2%-%c3%" from main array for /f "tokens=%c2%-%c3%" %%a in ("%q%") do ( set e%c1%=%%a %%b %%c %%d %%e set DisplayName=%%a set RxBytes=%%b set TxBytes=%%c set Cache=%%d set RxLastCacheBytes=%%e call:r echo. ) goto:eof :r echo DisplayName=%DisplayName% echo RxBytes=%RxBytes% echo TxBytes=%TxBytes% echo Cache=%Cache% echo RxLastCacheBytes=%RxLastCacheBytes% for /f "tokens=2 delims=:" %%a in ('clcc %TxBytes%/1048576*.25') do ( set out=%%a) set out=%out: =% echo out=%out% for /f "tokens=2 delims=:" %%a in ('clcc %RxLastCacheBytes%/1048576*.25') do ( set prox=%%a) set prox=%prox: =% echo prox=%prox% for /f "tokens=2 delims=:" %%a in ('clcc ^(%RxBytes%/1048576+%prox%+%out%^)*2.2') do ( set in=%%a) set in=%in: =% echo in=%in% for /f "tokens=2 delims=:" %%a in ('clcc %Cache%-%in%') do ( set Cache_in_out=%%a) set Cache_in_out=%Cache_in_out: =% echo Cache_in_out=%Cache_in_out% echo. echo %DisplayName%=Cache_in_out ^(%Cache_in_out%^)...; echo %DisplayName%=Cache_in_out ^(%Cache_in_out%^)...;>>send_mobile.txt |