binwatch@vk
08-01-2013, 13:35
Нужно сделать bat файл чтобы если число с файле st.cfg будет 3 то будет переадресация на завершение bat .А если не равно 3 ,то будет производиться дальнейшая накрутка в файле st.cfg.
Вот примерно накидал,но не работает. ::loop
if not exist st.cfg goto send
set /P ment= < st.cfg
set /P ent= 3
if %ment% == %ent% echo goto by
:send setlocal
if not exist st.cfg 1>st.cfg echo 0
0<st.cfg set /p "st="
set /a st+=1
1>st.cfg echo %st%
:: type st.cfg
goto loop
:by
exit
В чем ошибка?
Вот примерно накидал,но не работает. ::loop
if not exist st.cfg goto send
set /P ment= < st.cfg
set /P ent= 3
if %ment% == %ent% echo goto by
:send setlocal
if not exist st.cfg 1>st.cfg echo 0
0<st.cfg set /p "st="
set /a st+=1
1>st.cfg echo %st%
:: type st.cfg
goto loop
:by
exit
В чем ошибка?