title: Return a value from batch files (.bat file)to a text file
body: <p>I have a .bat file shown below</p>
  
  <pre><code>@echo off 
  for /f "delims=" %%a in ('C:\MyProj\Sources\SearchString.vbs') do (
  set ScriptOut=%%a)
  #echo Script Result = %ScriptOut%
  echo %ScriptOut% &gt;C:\ThreePartition\Sources\myfile.txt
  </code></pre>
  
  <p>I want my output variable which is ScriptOut to be stored into a text file.
  Can anyone suggest any method to be added to my existing batch file.</p>
  
  <p>Thanks
  Maddy</p>