I have a script file script_A.cmd containing a lot of commands, including the following:
set NUMBER_RUN=1
This script calls another script called stript_B.cmd. During the run of script_B.cmd, I want to update the script_A.cmd and increment the value of the NUMBER_RUN value by 1. In other words, after the first run, it should change that text in script_A.cmd to
set NUMBER_RUN=2
and so on for subsequent runs. So this requires both batch arithmetic and some kind of search/replace to change the actual text in script_A.cmd accordingly.
How do I do that, without using any tools downloaded from the internet, just Windows native batch?