title: Exe standard output writing in chunks, not immediately - Batch Scripting
body: <p>I have an exe (VC++ Application), which runs all through the day, prints logs then and there using printf() and Console::WriteLine(); statements.</p>
  
  <p>This exe is called by a batch script as below </p>
  
  <pre><code>**************
  set log=D:\MyProj\log\MyProg.log
  CMD /C D:\MyProj\MyProg.exe&gt;&gt;%log% 2&gt;&amp;1
  echo %date% %time% End &gt;&gt;%log%
  **************
  </code></pre>
  
  <p>But here log file is not updating in real time. Log is updating in chunks or at the completion of exe process. So I am not able to track what is going on in real time.</p>
  
  <p>Some times I could even see log traces coming from previous execution[Not sure].</p>
  
  <p>I am clueless, what is happening. Guys help me on this !!!</p>
  
  <p>Thanks in advance
  Regards
  Deepan</p>