title: Batch variables remove line break
body: <pre><code>setlocal enabledelayedexpansion
  
  ... a lot of batch script ...
  IF ... a lot of batch script ...    
  
  for /f "skip=2 delims== tokens=2" %%g in ('WMIC DATAFILE WHERE ^"Name^='!filePath!'^" GET Version /value') DO (
      set fileVersion=%%g
  )
  
  ECHO Version: !fileVersion!
  
  set nightlyBuildFullPath=%2\Setups\Nightly Builds\!fileVersion!\Full\
  
  ECHO FullPath: !nightlyBuildFullPath!
  </code></pre>
  
  <p>Result: </p>
  
  <pre><code>Version: 1.5.1810.202
  
  FullPath: C:\test\Setups\Nightly Builds\1.5.1810.202
  \Full\
  </code></pre>
  
  <p>I want to remove the linebreaks in the fileVersion variable because I have to build a path for later use. If I actually build the path string I have a linebreak in it, which corrupts my path.</p>