Answer the question
In order to leave comments, you need to log in
Why is writing to file not working?
@echo off
SetLocal EnableDelayedExpansion
for /F "delims=" %%i in (pack.id) do set pid=%%i
echo Last pack number: %pid%
set /P pid_flag=Обновить номер пакета? [Y/N]:
if /i %pid_flag% EQU y (
set /A pid=%pid%+1 > pack.id
goto :end_pid_question
)
if /i %pid_flag% EQU n (
set pid=%pid%
) ELSE (
echo Try again...
goto :pid_question
)
echo %pid% > pack.id
echo+%pid%>pack.id
then for some reason it writes 3 at the first start, and nothing more. set /P pid_flag=Обновить номер пакета? [Y/N]:
Answer the question
In order to leave comments, you need to log in
if I do: echo %pid% > pack.id
writes that the output of echo commands is disabled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question