Всем привет! В общем сделал батничек, вроде работает, но не так как должен
Хотя если разбить его на отдельные батники, то всё норм). Вот код:
Код: echo off
chcp 1251
setlocal enabledelayedexpansion
for /f "tokens=*" %%i in (Imena_M.txt) do call:set "%%i"
for /f "tokens=3 delims=_=" %%i in ('set value_') do set "randomValue1=%%i"
call:unset
for /f "tokens=*" %%i in (Otchestva_M.txt) do call:set "%%i"
for /f "tokens=3 delims=_=" %%i in ('set value_') do set "randomValue2=%%i"
call:unset
for /f "tokens=*" %%i in (Familiy_M.txt) do call:set "%%i"
for /f "tokens=3 delims=_=" %%i in ('set value_') do set "randomValue=%%i"
call:unset
echo Отчёт>Отчёты\%randomValue%.txt
echo %randomValue% %randomValue1% %randomValue2%>>Отчёты\%randomValue%.txt
for %%i in (1,2,3,4,5,6,7,8,9) do (
for %%j in (1,2,0) do set q_%%i_!random!=%%j
for %%j in (1,2,3,4,5,6,7,8,9) do set x_%%i_!random!=%%j
for %%j in (6,7,8) do set z_%%i_!random!=%%j
)
for %%i in (1,2,3,4,5,6,7,8,9) do (
for /f "tokens=4 delims=_=" %%j in ('set q_%%i') do set q-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set x_%%i') do set x-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set z_%%i') do set z-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set y_%%i') do set y-%%i=%%j
)
echo %q-1%%x-1%.0%x-4%.19%z-6%%x-7%>>Отчёты\%randomValue%.txt
for %%i in (1,2,3,4) do (
for %%j in (1,2,3,4) do set x_%%i_!random!=%%j
for %%j in (1,2,3,4,5,6,7,8,9) do set y_%%i_!random!=%%j
)
for %%i in (1,2,3,4,5) do (
for /f "tokens=4 delims=_=" %%j in ('set x_%%i') do set x-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set y_%%i') do set y-%%i=%%j
)
echo Отчёт>>Отчёты\%randomValue%.txt
for /f "tokens=*" %%i in (Ukicy.txt) do call:set "%%i"
for /f "tokens=3 delims=_=" %%i in ('set value_') do set "randomValue9=%%i"
call:unset
echo %randomValue9% %x-1%%y-1%-%x-2%%y-2%>>Отчёты\%randomValue%.txt
for %%i in (1,2,3,4,5) do (
for %%j in (5,4,3,5) do set x_%%i_!random!=%%j
for %%j in (1,2,3,4,5,6,7,8,9,0) do set y_%%i_!random!=%%j
)
for %%i in (1,2,3,4,5) do (
for %%j in (5,4,3,5) do set x_%%i_!random!=%%j
for %%j in (1,2,3,4,5,6,7,8,9,0) do set y_%%i_!random!=%%j
)
for %%i in (1,2,3,4,5) do (
for /f "tokens=4 delims=_=" %%j in ('set x_%%i') do set x-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set y_%%i') do set y-%%i=%%j
)
echo Отчёт%x-1%-%y-2%%y-3%-%y-4%%y-5%>>Отчёты\%randomValue%.txt
for %%i in (1,2,3,4) do (
for %%j in (1,2,3,4,5,6,7,8,9,0) do set y_%%i_!random!=%%j
)
for %%i in (1,2,3,4) do (
for /f "tokens=4 delims=_=" %%j in ('set y_%%i') do set y-%%i=%%j
)
echo +Отчёт%y-1%%y-2%%y-3%%y-4%%y-5%>>Отчёты\%randomValue%.txt
for %%i in (1,2,3,4,5) do (
for %%j in (q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m) do set x_%%i_!random!=%%j
for %%j in (1,2,3,4,5,6,7,8,9,0) do set y_%%i_!random!=%%j
)
for %%i in (1,2,3,4,5) do (
for /f "tokens=4 delims=_=" %%j in ('set x_%%i') do set x-%%i=%%j
for /f "tokens=4 delims=_=" %%j in ('set y_%%i') do set y-%%i=%%j
)
echo %x-1%%x-6%%x-2%%x-3%%x-4%%y-3%%x-5%%x-1%%x-5%%x-4%%y-1%%y-2%@gmail.com - %y-1%%x-2%%y-2%%y-3%%x-3%%y-4%%x-1%%x-5%%y-5%%y-1%%y-4%%y-6%>>Отчёты\%randomValue%.txt
echo Отчёт>>Отчёты\%randomValue%.txt
echo Отчёт - %x-1%%x-6%%x-2%%x-3%%x-4%%y-3%%x-5%%x-1%%x-5%%x-4%%y-1%%y-2% - %y-1%%x-2%%y-2%%y-3%%x-3%%y-4%%x-1%%x-5%%y-5%%y-1%%y-4%%y-6%>>Отчёты\%randomValue%.txt
echo Отчёт - %x-1%%x-6%%x-2%%x-3%%x-4%%y-3%%x-5%%x-1%%x-5%%x-4%%y-1%%y-2% - %y-1%%x-2%%y-2%%y-3%%x-3%%y-4%%x-1%%x-5%%y-5%%y-1%%y-4%%y-6%>>Отчёты\%randomValue%.txt
:set
set "value_%random%=%~1"
goto:eof
:unset
for /f "tokens=1 delims==" %%i in ('set value_') do set "%%i="