title: ECHO is off appended to text file
body: <p>I have in a batch file the following code:</p>
  
  <pre><code>rem capture the date/time(right down to the second) and then assign it to a variable
  set yy=%date:~-4%
  set dd=%date:~-7,2%
  set mm=%date:~-10,2%
  set newdate=%dd%%mm%%yy%_%Time:~0,8%
  set newdate=%newdate::=%
  set foldername=svetlana_backup_%newdate%
  set foldername=%foldername: =%
  
  set destination=R:\Backup
  
  if exist %destination% (
      rem do stuff if destination exists.
  ) else (
      call:GenerateErrorLog "%destination% not found."
  )
  
  
  :GenerateErrorLog
  echo %~1 &gt;&gt; error_log_%foldername%.txt
  goto:eof
  </code></pre>
  
  <p>It generates the following text file:</p>
  
  <pre><code>R:\Backup not found. 
  ECHO is off.
  </code></pre>
  
  <p>Why does it print ECHO is off, and how do I prevent it?</p>