title: Enable Logging to Batch File Commands
body: <p>I want to enable logging to a batch file which should log all the contents of command prompt including input/output/error. So I have tried something like the following but it results in a empty log file without any contents. It looks, I am missing something. Below is the batch file.</p>
  
  <pre><code>@echo off​
  SET LOGFILE=C:\Users\xason\Desktop\Logs\logs.txt
  call :logit
  exit /b 0
  ​
  :logit
  set root=C:\ORACLE\ORA_DRIVERS
  cd %root% &gt;&gt; %LOGFILE%
  UPDATE.EXE E:\class.ora
  ping 127.0.0.1 -n 6 &gt; nul
  </code></pre>