How to modify a numeric variable value with Windows batch
<p>I have a script file script_A.cmd containing a lot of commands, including the following:</p>

<pre><code>set NUMBER_RUN=1
</code></pre>

<p>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 <strong>text</strong> in script_A.cmd to</p>

<pre><code>set NUMBER_RUN=2
</code></pre>

<p>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.</p>

<p>How do I do that, without using any tools downloaded from the internet, just Windows native batch?</p>