title: Explain how Windows batch newline variable hack works
body: <p>Can someone please explain how this works?</p>
  
  <pre><code>@echo off
  REM Creating a Newline variable (the two blank lines are required!)
  set NLM=^
  
  
  set NL=^^^%NLM%%NLM%^%NLM%%NLM%
  REM Example Usage:
  echo There should be a newline%NL%inserted here.
  </code></pre>
  
  <p>emits:</p>
  
  <pre><code>There should be a newline
  inserted here.
  </code></pre>
  
  <p><em>from <a href="https://stackoverflow.com/questions/132799/how-can-you-echo-a-newline-in-batch-files/269819#269819">How can you echo a newline in batch files?</a></em></p>