Topic: [BAT] a problem with if
There is a following code:
@echo off set/P aud_c = "aud:" set/a aud_v=0 :audid if not %aud_c % equ 0 ( set/a aud_v = % aud_v % + 1 set/P aud_id. % aud_v % = "ID %aud_v %:" if not "%aud_v %" equ "%aud_c %" (goto audid))
the Problem that for the first time does not work "set/a aud_v = % aud_v % + 1", i.e. the variable and remains equal to zero.
After variable input (set/P aud_id. % aud_v % = "ID %aud_v %:") and goto - the variable is already equal to unit.
Please, prompt in what a problem.