title: Assigning newline character to a variable in a batch script
body: <p>The following is the batch script i have written</p>
  
  <pre><code>@echo off
  setlocal enabledelayedexpansion
  set finalcontent=
  For /F "tokens=1-2* delims=  " %%I in (abc.txt) do (
  IF %%J EQU MAJORVER (
  set currentline=%%I %%J %1
  set finalcontent=!finalcontent!!currentline!
  ) ELSE IF %%J EQU MINORVER (
  set currentline=%%I %%J %2
  set finalcontent=!finalcontent!!currentline!
  ) ELSE IF %%J EQU BUILDNUM (
  set currentline=%%I %%J %3
  set finalcontent=!finalcontent!!currentline!
  ) ELSE (
  set currentline=%%I %%J %%K%NL%
  set finalcontent=!finalcontent!!currentline!
  )
  )
  echo %finalcontent%&gt;&gt;xyz.txt
  </code></pre>
  
  <p>I want a newline character appended at the end of every occurence of the variable currentline. Can anyone guide me on this?</p>