title: How to store the output of batch (CALL) command to a variable
body: <p>I have the batch file which has the command to call <code>second.bat</code> file. It will produce single line of output when it called. I want to store that line into variable.</p>
  
  <pre><code>CALL second.bat
  </code></pre>
  
  <p>I have tried using the following lines of commands but no use</p>
  
  <pre><code>FOR /F "tokens=* USEBACKQ" %%F IN ('COMMAND') do SET result=%%F
  FOR /F "tokens=1 delims= " %%A IN ('COMMAND') DO SET NumDocs=%%A
  </code></pre>
  
  <p>I don't know what to replace with <code>COMMAND</code></p>